开发者

instance failure error in asp.net web site

I have a website included login module.when i hosted the website in iis there is an error

Server Error in "/" Application.
system.invalid operation Exception: Instance Failure

My ConnectionString is like this

<add name="MyConnectionstring" Connectionstring="Data Source=IP Address,1433;Network Library=DBMSSOCN;initial catalog=Databasename;integrated secur开发者_StackOverflow中文版ity=True" Provider Name="System.data.sqlclient"/>

How can i solve this problem?Any one knows Please help me


Simply change DataSource=My-PC\\\SqlServer2008 to DataSource=My-PC\SqlServer2008 in your Web config because the previous one is valid one you are writing in Code Beind file but not in Web config file as it is an XML file.


The first thing I noticed is that you need to replace IP Address in your connection string with the actual IP address and Databasename with the actual database name. You also don't need ",1433" after the IP Address since 1433 is the standard port.

Second, is the SQL you are connecting to the default instance on the machine? If it is a named instance, you need to make sure to include the name in the data source setting.

Third, does the ID the ASP.NET process is running under have authority to connect to the SQL Server instance?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜