<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Configuration and Deployment</title><link>http://forums.asp.net/26.aspx</link><description>Configuring and deploying ASP.NET applications - web.config, \bin, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: First deployment. ASPNETDB problems</title><link>http://forums.asp.net/thread/2695063.aspx</link><pubDate>Mon, 20 Oct 2008 18:10:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2695063</guid><dc:creator>jeff@zina.com</dc:creator><author>jeff@zina.com</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2695063.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=2695063</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;eitanmiz:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;I have openned this thread,&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;I combined them back to one thread.&amp;nbsp; Please stay in the original thread instead of repeating the questions in new threads.&lt;/p&gt;
&lt;p&gt;As for using the ASPNETDB you must have the correct connection string for it and upload it or transfer it to your host in a manner that your host provides.&amp;nbsp; The default on is in SQL Server Express, but your host may provide SQL Server.&amp;nbsp; In that case you may have to attach the file in your App_Data folder to your host&amp;#39;s SQL Server.&amp;nbsp; You need to find out what your host supports before anyone can tell you how to deploy it.&lt;/p&gt;
&lt;p&gt;Also look at:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blah.winsmarts.com/2006/05/19/aspnetdb--production-deployment--practical-tips.aspx"&gt;http://blah.winsmarts.com/2006/05/19/aspnetdb--production-deployment--practical-tips.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2006/12/22/recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx"&gt;http://weblogs.asp.net/scottgu/archive/2006/12/22/recipe-deploying-a-sql-database-to-a-remote-hosting-environment-part-1.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.c-sharpcorner.com/UploadFile/dsdaf/104012006083052AM/1.aspx?ArticleID=e36614ce-c6a5-461b-8e97-a6826f01be4a"&gt;http://www.c-sharpcorner.com/UploadFile/dsdaf/104012006083052AM/1.aspx?ArticleID=e36614ce-c6a5-461b-8e97-a6826f01be4a&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Jeff&lt;/p&gt;</description></item><item><title>First deployment. ASPNETDB problems</title><link>http://forums.asp.net/thread/2692861.aspx</link><pubDate>Sun, 19 Oct 2008 21:34:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2692861</guid><dc:creator>eitanmiz</dc:creator><author>eitanmiz</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2692861.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=2692861</wfw:commentRss><description>&lt;p&gt;Hello. &lt;/p&gt;&lt;p&gt;I have openned this thread, after desperate tries to put on the air the deploymented project.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;See the thread : http://forums.asp.net/p/1335247/2689515.aspx#2689515&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Still, I have a problem. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I want to deploy the site, I have written in Visual Studio 2008,&lt;/p&gt;&lt;p&gt;and want to put it on an hosting machine.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The app_data folder :&amp;nbsp; the ASPNETDB is created automaticaly.&lt;/p&gt;&lt;p&gt;I don&amp;#39;t know if ASPNETDB is realy necessary, but I still see I cannot access the site.&lt;/p&gt;&lt;p&gt;For first time - can&amp;#39;t I just deploy my project without the ASPNETDB (and project should work, with no exceptions) ?&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Second - If ASPNETDB is necessary, I need step by step, how can I deploy my project,&lt;/p&gt;&lt;p&gt;and how can I use ASPNETDB ?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Help, please. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks :) &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: problem on deployment : app_data. - newbie question.</title><link>http://forums.asp.net/thread/2689515.aspx</link><pubDate>Fri, 17 Oct 2008 10:36:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2689515</guid><dc:creator>eitanmiz</dc:creator><author>eitanmiz</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2689515.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=2689515</wfw:commentRss><description>&lt;p&gt;I didn&amp;#39;t succeed creating the database aspnetdb.mdf,&lt;/p&gt;&lt;p&gt;so I have downloaded it from the site :http://www.4shared.com/file/59591680/a5b7abdf/ASPNETDB_TMP.html, and put it on the hosting machine.&lt;/p&gt;&lt;p&gt;(It is 10M bytes. too expensive, since I don&amp;#39;t much need that file - I just want to do some deployment of CSM : Control System Management) &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;I assume that hosting site supports the sql-express, since the sintax I gave at this thread is auto-generated by the site, and I have two databases on the site.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Two problems :&lt;/p&gt;&lt;p&gt;1) ) (Minor problem, since I overcome that when downloading another db-file from the site I gave) When trying creating the database on my computer, I got the erro message :&lt;/p&gt;&lt;p&gt;&amp;nbsp;Setup failed.&lt;br /&gt;&lt;br /&gt;Exception:&lt;br /&gt;Unable to connect to SQL Server 
database.&lt;br /&gt;&lt;br /&gt;----------------------------------------&lt;br /&gt;Details of 
failure&lt;br /&gt;----------------------------------------&lt;br /&gt;&lt;br /&gt;System.Web.HttpException: 
Unable to connect to SQL Server database. ---&amp;gt; 
&lt;br /&gt;System.Data.SqlClient.SqlException: An error has occurred while establishing 
&lt;br /&gt;a connection to the server.&amp;nbsp; When connecting to SQL Server 2005, this 
&lt;br /&gt;failure may be caused by the fact that under the default settings SQL Server 
&lt;br /&gt;does not allow remote connections. (provider: Named Pipes Provider, error: 
&lt;br /&gt;40 - Could not open a connection to SQL Server)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException &lt;br /&gt;exception, 
Boolean breakConnection)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
&lt;br /&gt;System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject 
&lt;br /&gt;stateObj)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.TdsParser.Connect(ServerInfo 
serverInfo, &lt;br /&gt;SqlInternalConnectionTds connHandler, Boolean 
ignoreSniOpenTimeout, Int64 &lt;br /&gt;timerExpire, Boolean encrypt, Boolean 
trustServerCert, Boolean &lt;br /&gt;integratedSecurity, SqlConnection 
owningObject)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
&lt;br /&gt;System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo 
&lt;br /&gt;serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 
&lt;br /&gt;timerExpire, SqlConnection owningObject)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String &lt;br /&gt;host, 
String newPassword, Boolean redirectedUserInstance, SqlConnection 
&lt;br /&gt;owningObject, SqlConnectionString connectionOptions, Int64 timerStart)&lt;br /&gt;&amp;nbsp;&amp;nbsp; 
at 
&lt;br /&gt;System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection 
&lt;br /&gt;owningObject, SqlConnectionString connectionOptions, String newPassword, 
&lt;br /&gt;Boolean redirectedUserInstance)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
&lt;br /&gt;System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity 
&lt;br /&gt;identity, SqlConnectionString connectionOptions, Object providerInfo, String 
&lt;br /&gt;newPassword, SqlConnection owningObject, Boolean 
redirectedUserInstance)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
&lt;br /&gt;System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions 
&lt;br /&gt;options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection 
&lt;br /&gt;owningConnection)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
&lt;br /&gt;System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection 
&lt;br /&gt;owningConnection, DbConnectionPool pool, DbConnectionOptions options)&lt;br /&gt;&amp;nbsp;&amp;nbsp; 
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection 
&lt;br /&gt;owningObject)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
&lt;br /&gt;System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection 
&lt;br /&gt;owningObject)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection 
&lt;br /&gt;owningObject)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
&lt;br /&gt;System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection 
&lt;br /&gt;owningConnection)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
&lt;br /&gt;System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection 
&lt;br /&gt;outerConnection, DbConnectionFactory connectionFactory)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
System.Data.SqlClient.SqlConnection.Open()&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
System.Web.Management.SqlServices.GetSqlConnection(String server, &lt;br /&gt;String 
user, String password, Boolean trusted, String connectionString)&lt;br /&gt;&amp;nbsp;&amp;nbsp; --- End 
of inner exception stack trace ---&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
System.Web.Management.SqlServices.GetSqlConnection(String server, &lt;br /&gt;String 
user, String password, Boolean trusted, String connectionString)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
System.Web.Management.SqlServices.SetupApplicationServices(String &lt;br /&gt;server, 
String user, String password, Boolean trusted, String &lt;br /&gt;connectionString, 
String database, String dbFileName, SqlFeatures features, &lt;br /&gt;Boolean 
install)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at System.Web.Management.SqlServices.Install(String database, 
SqlFeatures &lt;br /&gt;features, String connectionString)&lt;br /&gt;&amp;nbsp;&amp;nbsp; at 
System.Web.Management.ConfirmPanel.Execute()&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2) (Major problem, since I cannot continue) :&lt;/p&gt;&lt;p&gt;The file is 10M !!!&lt;/p&gt;&lt;p&gt;Nevertheless, I got the following message,&lt;/p&gt;&lt;p&gt;and I think there is another file I have to copy.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;h2&gt; &lt;i&gt;Failed to generate a user instance of SQL Server due to
failure in retrieving the user&amp;#39;s local application data path. Please
make sure the user has a local user profile on the computer. The
connection will be closed.&lt;/i&gt; &lt;/h2&gt;&lt;/span&gt;

            &lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;

            &lt;b&gt; Description: &lt;/b&gt;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. &lt;br /&gt;&lt;br /&gt;

            &lt;b&gt; Exception Details: &lt;/b&gt;System.Data.SqlClient.SqlException:
Failed to generate a user instance of SQL Server due to failure in
retrieving the user&amp;#39;s local application data path. Please make sure the
user has a local user profile on the computer. The connection will be
closed.&lt;br /&gt;&lt;br /&gt;

            &lt;b&gt;Source Error:&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;

            &lt;table bgcolor="#ffffcc"&gt;
               &lt;tr&gt;
                  &lt;td&gt;
                      &lt;code&gt;
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.&lt;/code&gt;

                  &lt;/td&gt;
               &lt;/tr&gt;
            &lt;/table&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;b&gt;Stack Trace:&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;

            &lt;table bgcolor="#ffffcc"&gt;
               &lt;tr&gt;
                  &lt;td&gt;
                      &lt;code&gt;&lt;/code&gt;&lt;pre&gt;[SqlException (0x80131904): Failed to generate a user instance of SQL Server due to failure in retrieving the user&amp;#39;s local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.]&lt;br /&gt;   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800131&lt;br /&gt;   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186&lt;br /&gt;   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932&lt;br /&gt;   System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33&lt;br /&gt;   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +172&lt;br /&gt;   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381&lt;br /&gt;   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181&lt;br /&gt;   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173&lt;br /&gt;   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +133&lt;br /&gt;   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30&lt;br /&gt;   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424&lt;br /&gt;   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66&lt;br /&gt;   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +494&lt;br /&gt;   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82&lt;br /&gt;   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105&lt;br /&gt;   System.Data.SqlClient.SqlConnection.Open() +111&lt;br /&gt;   System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84&lt;br /&gt;   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197&lt;br /&gt;   System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32&amp;amp; status, String&amp;amp; password, Int32&amp;amp; passwordFormat, String&amp;amp; passwordSalt, Int32&amp;amp; failedPasswordAttemptCount, Int32&amp;amp; failedPasswordAnswerAttemptCount, Boolean&amp;amp; isApproved, DateTime&amp;amp; lastLoginDate, DateTime&amp;amp; lastActivityDate) +1121&lt;br /&gt;   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String&amp;amp; salt, Int32&amp;amp; passwordFormat) +105&lt;br /&gt;   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42&lt;br /&gt;   System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83&lt;br /&gt;   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160&lt;br /&gt;   System.Web.UI.WebControls.Login.AttemptLogin() +105&lt;br /&gt;   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99&lt;br /&gt;   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35&lt;br /&gt;   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115&lt;br /&gt;   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163&lt;br /&gt;   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7&lt;br /&gt;   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11&lt;br /&gt;   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33&lt;br /&gt;   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746&lt;br /&gt;&lt;/pre&gt;

                  &lt;/td&gt;
               &lt;/tr&gt;
            &lt;/table&gt;

            &lt;br /&gt;

            &lt;/font&gt;&lt;/p&gt;&lt;hr /&gt;

&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;            &lt;b&gt;Version Information:&lt;/b&gt;&amp;nbsp;Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

            &lt;/font&gt;&lt;p&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&amp;nbsp;

            &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks :) &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: problem on deployment : app_data. - newbie question.</title><link>http://forums.asp.net/thread/2688539.aspx</link><pubDate>Thu, 16 Oct 2008 23:52:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2688539</guid><dc:creator>Bruce L</dc:creator><author>Bruce L</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2688539.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=2688539</wfw:commentRss><description>&lt;p&gt;aspnetdb.mdf is a SQL database file that contains your membership data.&amp;nbsp; When you run it on your local machine, the database will be attached using SQL Express (installed w/ VS.NET).&lt;/p&gt;
&lt;p&gt;When you upload your application to your hoster which probably doesn&amp;#39;t support SQL express, you&amp;#39;ll need to attach the database to their SQL server and update the connection string to point to that.&lt;/p&gt;</description></item><item><title>problem on deployment : app_data. - newbie question.</title><link>http://forums.asp.net/thread/2688450.aspx</link><pubDate>Thu, 16 Oct 2008 22:18:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2688450</guid><dc:creator>eitanmiz</dc:creator><author>eitanmiz</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2688450.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=26&amp;PostID=2688450</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I am trying to deploy my project.&lt;/p&gt;&lt;p&gt;I have created an app_data folder on the hosting machine (full control).&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Hosting machine has :&lt;/p&gt;&lt;p&gt;PLESK 8.3.0,&lt;/p&gt;&lt;p&gt;ConnectionString for LocalSqlServer : &lt;span class="Apple-style-span" style="border-collapse:separate;font-family:Tahoma;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-indent:0px;text-transform:none;white-space:pre;widows:2;word-spacing:0px;"&gt;data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true&lt;/span&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;asp.net version &lt;span class="Apple-style-span" style="border-collapse:collapse;font-family:Tahoma;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-align:left;text-indent:0px;text-transform:none;white-space:normal;widows:2;word-spacing:0px;"&gt;2.0.50727.0&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I have Visual Studio 2008.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;After do publishing&amp;nbsp; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;and&amp;nbsp; copy the relevant code.&lt;/p&gt;&lt;p&gt;I get to an error (which seems to be building the ASPNETDB.MDF database file automatically),&lt;/p&gt;&lt;p&gt;and then I get the error :&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h2&gt;&lt;i&gt;&lt;i&gt;Failed to generate a user instance of SQL Server due to failure in retrieving the user&amp;#39;s local application data path ...&lt;/i&gt;&lt;/i&gt;&lt;/h2&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I don&amp;#39;t understand what is ASPNETDB.MDF for (some kind of user tracing DB ??? and why is that file ?), and How can I overcome the above.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;One thing, is to create the database file on my machine, and just copy the database file to the hosting machine.&lt;/p&gt;&lt;p&gt;But for Visual studio 2008, even in my computer, I have got the same error,&lt;/p&gt;&lt;p&gt;and I didn&amp;#39;t see any documentation on VS 2008 to run commandline (I didn&amp;#39;t find a command-line in VS 2008,&lt;/p&gt;&lt;p&gt;and the file aspnet_reqsql neigther).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I think the above suggested solution is right, since user is not full-controling and can write files automatically,&lt;/p&gt;&lt;p&gt;but how can I do such a file : ASPNETDB.MDF) ? &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any suggestion ?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks :) &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>