Tuesday, November 23, 2010

Microsoft.Practices.Repository : Make sure "GenericResources.resources" was correctly embedded or linked into assembly

Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "GenericResources.resources" was correctly embedded or linked into assembly "Microsoft.Practices.Repository" at compile time, or that all the satellite assemblies required are loadable and fully signed.

This was the error which held my neck for more than two days. We follow Repository Factory for Visual Studio 2008 for Data Access Layer Creation (By Microsoft Patterns and Practices.)


I replaced the ExceptionHandling snippet [throw new RepositoryFailureException(ex);]
with [throw new RepositoryFailureException(ex.Message,ex.InnerException);] in each repository class generated by Repository Factory.

Did a Find and Replace for the whole DataAccess Project. Then went for a build of all the projects (DataAccess Layer, Business Logic Layer, and Presentation Layer. Then Ran the solution by Setting Startup Page as Finance User Dashboard.

Error got changed to the following.

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)

This is a very familiar one. Could be some thing wrong either with the Connection String in the Web.config or Failed network connection. :) the parameters mentioned in the Web.Config was pointing a wrong DB.

See, how vague the initial error was. It didnt have any relation with the actual problem. Be aware of these situations, these can mess up your day.

Wednesday, November 10, 2010

Resolved : Unable to connect to asp.net development server

Working on Visual Studio 2008 and not debugging the website and whenever you run the solution it gives error as "Unable to connect to asp.net development server" ?


WebDev.WebServer.EXE is the process associated with Visual Studio 2008 when you run a project(solution).
This is located EITHER at
C:\Program files\Common files\Microsoft Shared\DevServer\9.0  OR C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727


Problem is, your Visual Studio is unable to get attached to this exe, when you try to run the solution due to some reason. Problem with mine was, this executable (WebDev.WebServer.EXE) was corrupted. (There is no method known to identify this exe is corrupted or not). I just replaced this exe with the one i have copied from my colleagues PC where he had installed VS 2008, and was running fine. 


This has helped me in resolving the issue "Unable to connect to asp.net development server" with VS 2008. 
Have a try.