Click here to Skip to main content
15,921,660 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,
I have created a website and have used entity framework with database,when I run in localhost it works fine but when I host the website on server and browse my website i get this error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

and my connectionstring is this:
HTML
<connectionStrings>
    <add name="DBEntities" connectionString="metadata=res://*/App_Code.DB.csdl|res://*/App_Code.DB.ssdl|res://*/App_Code.DB.msl;provider=System.Data.SqlClient;provider connection string="data source=local;initial catalog=DB;persist security info=True;user id=user1;password=pass1;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>

what is wrong?how do solve this?
please help me.
Thanks in Advance.
Posted
Updated 19-Apr-14 5:23am
v2
Comments
NewWebDesigner 19-Apr-14 8:19am    
i recieve an email by this word:
prasanna.raj has posted an answer to your question about "How do I set connection string"
but i cannot see this answer online in your site!
why?
[no name] 19-Apr-14 8:25am    
Maybe because he deleted it? Or it was deleted for him?

1 solution

Hello WebDesigner,

Check your server's error logs.
The error message you have shared is vague and generic.

So some steps I can suggest you to have:"

1:Try restarting the server or VM.
2.Try restarting the Application pool in the IIS.
3.Try deleting and creating the Application pool once again.

(FYI)This error doesnt have any connection with the connection string:)
 
Share this answer
 
Comments
NewWebDesigner 20-Apr-14 1:26am    
thanks for your answer.first time i restore database from backup,but this time create from generate script and my problem solved.

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