Hi Imar.
I am working on a site with the help of your fine book ASP.NET 4 in C# and
VB.
It is in fact closely modeled after parts of the Planet Wrox sample site. My site includes so far, besides a membership part, only a photo albums module analogous to the Gig Pics section of Planet Wrox. Later, I want to add something like a newsletter or a diary section.
I use VS2010 and C# for my work on the website. The site is not finished, but works OK on my development machine (membership and photo section parts).
I have my own web server and have moved the site to the server. The URL is
http://astak.nes56.net
At first, neither the membership part nor the pics data access worked. After some tweaking of the connection string for the aspnetdb.mdf database, I managed to log into the site. I suspect that I must do something similar for the N56.mdf database as well because when I try to open a photo album, I get this:
Quote:
Format of the initialization string does not conform to specification starting at index 117.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 117.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Format of the initialization string does not conform to specification starting at index 117.]
System.Data.Common.DbConnectionOptions.GetKeyValue Pair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue) +6374602
System.Data.Common.DbConnectionOptions.ParseIntern al(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +253
System.Data.Common.DbConnectionOptions..ctor(Strin g connectionString, Hashtable synonyms, Boolean useOdbcRules) +134
System.Data.EntityClient.EntityConnection.ChangeCo nnectionString(String newConnectionString) +440
System.Data.Objects.ObjectContext..ctor(String connectionString) +69
System.Web.UI.WebControls.EntityDataSourceView.Con structContext() +547
System.Web.UI.WebControls.EntityDataSourceView.Exe cuteSelect(DataSourceSelectArguments arguments) +147
System.Web.UI.WebControls.ListControl.OnDataBindin g(EventArgs e) +188
System.Web.UI.WebControls.ListControl.PerformSelec t() +51
System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +105
System.Web.UI.WebControls.ListControl.OnPreRender( EventArgs e) +35
System.Web.UI.Control.PreRenderRecursiveInternal() +113
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4201
|
Here is the part of my web.config file that has to do with te connection strings:
HTML Code:
<connectionStrings>
<clear/>
<add name="LocalSqlServer" connectionString="Data Source=(local);Initial Catalog=AstaKAspnetdb;User ID=AstaKUser;password=Pa$$w0rD" providerName="System.Data.SqlClient"/>
<add name="N56Entities" connectionString="metadata=res://*/App_Code.N56.csdl|res://*/App_Code.N56.ssdl|res://*/App_Code.N56.msl;provider=System.Data.SqlClient;provider connection string="data source=(local);Initial Catalog=AstaKN56;integrated security=True;" providerName="System.Data.EntityClient" />
<add name="N56ConnectionString1" connectionString="Data Source=(local);Initial Catalog=AstaKN56;User ID=AstaKUser;password=Pa$$w0rD" providerName="System.Data.SqlClient" />
</connectionStrings>
I would appreciate if you could give me a hint.
Regards,