SqlException was unhandled by user code

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/29/2011 9:01:29 AM
Gravatar
Total Posts 45
Thanks, cms_developer Contributer:http://codeissue.com/

SqlException was unhandled by user code

{"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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"}

Hi,

When I am trying to build from Tortoise repository sync code everything is building fine.

But when I am trying to build from downloaded version of source code I am getting this error.

I tried to touch the Default.aspx file under setup too as per your earlier instructions but still doesn't help?

Anything I am doing wrong here?

I just made this change is user config after i downloaded the source code.

<add key="MSSQLConnectionString" value="Data Source=myRemoreMachineName;Database=mojoPortal_clone;uid=mojouser;Pwd=mojouser2011;"/>

Thanks,

cms_developer

 

8/29/2011 9:16:29 AM
Gravatar
Total Posts 18439

Re: SqlException was unhandled by user code

I recommend always get the code using Tortoise HG. The download links for source code is something that codeplex generates and apparently it does not always correctly produce a download package from the repository.

Also be aware that changes in user.config are not automatically detected by the ASP.NET runtime like changes to Web.config are, so if you edit user.config you need to touch Web.config to make it detect your changes.

Hope that helps,

Joe

8/29/2011 9:41:24 AM
Gravatar
Total Posts 45
Thanks, cms_developer Contributer:http://codeissue.com/

Re: SqlException was unhandled by user code

@Joe,

Thanks for your prompt response.

Really appreciate it.

It worked after I shifted my connection parameters from user.config to web.config.

Thanks,

cms_developer

8/29/2011 9:44:37 AM
Gravatar
Total Posts 18439

Re: SqlException was unhandled by user code

I would keep the connection string and any other <appSettings that you modify in user.config. This way whenever you upgrade its easier to use the new Web.config without having as much work to restore customizations.

You just have to remember that it won't detect those changes so you have to make it detect them by touching Web.config or recycling the app pool.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.