简体   繁体   English

asp.NET Web.config

[英]asp.NET Web.config

Hello guys i have an website online wich access the database. 大家好,我有一个在线访问数据库的网站。 The database access for the connection String called GardenLadies is fine and works. 名为GardenLadies的连接字符串的数据库访问正常且有效。 I've added to the host database also the localsqlServer database info. 我还向主机数据库添加了localsqlServer数据库信息。 My problem is when i log in it gives me "Server Error in '/' Application.". 我的问题是,当我登录时,它显示“ /应用程序中的服务器错误”。

here´s my web config 这是我的网络配置

<?xml version="1.0"?>
<configuration>
  <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="GardenLadies" connectionString="Database=GardenLadies.mdf; Data Source=195.22.11.199;Initial Catalog=GardenLadies;User ID=****;Password=*****;" providerName="System.Data.SqlClient"/>
    <add name="LocalSqlServer" connectionString="Database=GardenLadies.mdf; Data Source=195.22.11.199;Initial Catalog=GardenLadies;User ID=****;Password=****;" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <system.web>
    <authentication mode="Forms"/>
    <authorization>
      <allow users="*"/>
      <deny users="?"/>
    </authorization>
    <compilation debug="true"/>
  </system.web>
</configuration>

I've used this formula of webconfig in other website and it has worked for me, i don't get what i'm missing here. 我在其他网站中使用了webconfig的公式,它对我有用,但我不明白我在这里所缺少的。

Thanks 谢谢

This tells me that the problem is not the BD or the login, but an image that i use in masterpage. 这告诉我问题不是BD或登录名,而是我在母版页中使用的图像。

"Access to the path 'E:\\inetpub\\vhosts\\garden-ladies.pt\\httpdocs\\images\\Imagens\\fundo.jpg' is denied. " “拒绝访问路径'E:\\ inetpub \\ vhosts \\ garden-ladies.pt \\ httpdocs \\ images \\ Imagens \\ fundo.jpg'。”

I have other images in similar location but in anonymous pages. 我在类似位置但在匿名页面中有其他图像。 Any ideas? 有任何想法吗?

Sounds like you have a conflict with some information in your machine config. 听起来您与计算机配置中的某些信息有冲突。

What does your provider section look like? 您的提供者部分是什么样的?

AND why do you have two connection strings with the same info? 并且为什么您有两个具有相同信息的连接字符串? which is asking for issues. 正在问问题。

Clear them all in your web config and set your default providers to use your GardenLadies connection string. 清除所有它们在您的Web配置,并设置默认提供程序以使用您的GardenLadies连接字符串。

Hi guys i've solved it, problem was with permissions in some folders in host. 嗨,大家好,我已经解决了,问题出在主机中某些文件夹的权限上。 Gave the permissions and everything worked. 授予权限,一切正常。

Thanks for the help. 谢谢您的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM