0

I have developed a test site in asp.net. While it is in running of the in built webserver it functions fine and am able to access the database (msde). But when i host it on IIS server on the same machine I get the following error whenever the site accesses the database:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

How do I overcome this error.

The connection string in my web.config is as follows:

<connectionStrings>
        <add name="Cloud" providerName="System.Data.SqlClient" connectionString="server=naheed-pc1\mycloudflash;database=cloud;uid=sa;pwd=!cloud.123" />
    </connectionStrings>

Please assist.

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by naheedkassam
0

hello.
it happen to me i think for long time ago,so what i can tell you that is sql security,go to sql server to security then you have NT AUTHORITY\NETWORK SERVICE then properties and go to user mapping,check your database name and choose a database role like public and try now.if it didn't work try NT AUTHORITY\SYSTEM and do the same thing.
really i can't remember,but at least i direct you.
hope this will help you.

0

Please check if you are able to connect using sql server management studio on the same name "naheed-pc1\mycloudflash" if not, then use the same name as shown in the sql server management studio

Edited by atinobrian

0

Hi all. thanks for your responses. I was finally able to resolve the problem by installing full sql version and using the tools to configure remote access to the database.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.