Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i publish my .net web application over network ? i tried but sa login not working even in local system. Thanks a lot for help

I use visual studio 2010 windows 7

I tried publishing it works on My computer not on remote computer and sa login for database not working even on my computer ,
XML
<add name="MyData" connectionString="server=.\SQLEXPRESS;Database =.mdf;Integrated Security=SSPI;User Id=sa;Password = passadmin;" providerName="System.Data.SqlClient" />
    </connectionStrings>
    <system.web>



This is my connection string
Posted

1 solution

"sa" is a default login which has full admin privileges, and which is immediately disabled by almost every competent database administrator when the initial setup is complete for security reasons.

You need to talk to your DBA and get valid credentials for the remote system. (And development machines need a different connection string to production: LOCALHOST is normally only used for development)
 
Share this answer
 
Comments
Anynomus Anynomus 9-Mar-15 4:32am    
I am the one who made this asp.net web application , i have given writes to sqlserver agent user also :( , i cant even open database on local computer , i only can connect when i do connect and keep open in visual studio , yeah i had that local host but than i changed it to .\SQLEXRESS , but it still wasnt working sadly Frown | :( How about i cant even open design page of other computer in network which doesnt access database ? after published and shared over network

Thank you so much for your Response ;]
OriginalGriff 9-Mar-15 6:23am    
OK, if you can connect via VS then start there.

Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.

Now you app should be able to access the DB via it's code.
Anynomus Anynomus 9-Mar-15 8:13am    
Yeah i did figured it out path was in Sql Server Management studio was wrong its working in my computer now but when i try to open published web application from another computer with URL PC-NAME / FolderName / Aspx page or using IP Address in place of PC - Name than still it is not working

Thank you so much for your response and Help
OriginalGriff 9-Mar-15 8:34am    
Then you need to look at the network on which the remote web app is running - it needs a connection string that is appropriate to it (and LOCALHOST is unlikely to work, unless the SQL instance is installed on the same PC - which would probably be a bad idea)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900