Don´t work in my providerhttp://forums.asp.net/t/1498116.aspx/1?Don+t+work+in+my+providerSun, 10 Jan 2010 09:20:43 -050014981163537356http://forums.asp.net/p/1498116/3537356.aspx/1?Don+t+work+in+my+providerDon´t work in my provider <p>Hi,</p> <p>I installed the Personal Web Starter Kit in Visual Web&nbsp;Developer 2008 and it´s ok.</p> <p>I run it in my local computer and have no problems.</p> <p>But, in the server provider, it´s don´t work. The provider has mssql express.</p> <p>The connectionStrings:</p> <p>&lt;connectionStrings&gt;<br> &nbsp;&nbsp;&lt;add name=&quot;Personal&quot; connectionString=&quot;Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf&quot; providerName=&quot;System.Data.SqlClient&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &lt;remove name=&quot;LocalSqlServer&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &lt;add name=&quot;LocalSqlServer&quot; connectionString=&quot;Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf&quot; /&gt;<br> &nbsp; &lt;/connectionStrings&gt;</p> <p>The server presents this error:</p> <p>Server Error in '/mypersonal' Application.<br> --------------------------------------------------------------------------------</p> <p>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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) <br> 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. </p> <p>Exception Details: System.Data.SqlClient.SqlException: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)</p> <p>Source Error: </p> <p><br> Line 5:&nbsp; &nbsp;Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)<br> Line 6:&nbsp; &nbsp;&nbsp;AddHandler SiteMap.SiteMapResolve, AddressOf Me.AppendQueryString<br> Line 7:&nbsp; &nbsp;&nbsp;If (Roles.RoleExists(&quot;Administrators&quot;) = False) Then<br> Line 8:&nbsp; &nbsp;&nbsp;&nbsp;Roles.CreateRole(&quot;Administrators&quot;)<br> Line 9:&nbsp; &nbsp;&nbsp;End If<br> &nbsp;</p> <p>Source File: C:\Inetpub\vhosts\passosecompassos.com.br\httpdocs\lmcon\global.asax&nbsp;&nbsp;&nbsp; Line: 7 </p> <p>Stack Trace: </p> <p><br> [SqlException (0x80131904): 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]<br> &nbsp;&nbsp; System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) &#43;4846887<br> &nbsp;&nbsp; System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) &#43;194<br> &nbsp;&nbsp; System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) &#43;4860189<br> &nbsp;&nbsp; System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) &#43;90<br> &nbsp;&nbsp; System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) &#43;376<br> &nbsp;&nbsp; System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) &#43;221<br> &nbsp;&nbsp; System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) &#43;189<br> &nbsp;&nbsp; System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) &#43;4861315<br> &nbsp;&nbsp; System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) &#43;31<br> &nbsp;&nbsp; System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) &#43;433<br> &nbsp;&nbsp; System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) &#43;66<br> &nbsp;&nbsp; System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) &#43;499<br> &nbsp;&nbsp; System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) &#43;65<br> &nbsp;&nbsp; System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) &#43;117<br> &nbsp;&nbsp; System.Data.SqlClient.SqlConnection.Open() &#43;122<br> &nbsp;&nbsp; System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) &#43;87<br> &nbsp;&nbsp; System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) &#43;221<br> &nbsp;&nbsp; System.Web.Security.SqlRoleProvider.RoleExists(String roleName) &#43;478<br> &nbsp;&nbsp; System.Web.Security.Roles.RoleExists(String roleName) &#43;73<br> &nbsp;&nbsp; ASP.global_asax.Application_Start(Object sender, EventArgs e) in C:\Inetpub\vhosts\passosecompassos.com.br\httpdocs\lmcon\global.asax:7</p> <p>&nbsp;<br> --------------------------------------------------------------------------------<br> Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082 </p> <p>Best regards</p> <p>Solange</p> <p>&nbsp;</p> <p>&nbsp;</p> 2009-11-28T16:04:51-05:003537488http://forums.asp.net/p/1498116/3537488.aspx/1?Re+Don+t+work+in+my+providerRe: Don´t work in my provider <p>When you host in the server, SQL Server express of SQL Server will be running in a different machine. You need to talk to the provider and you need to get the IP Address so that you can change your connectionstring in the web.config file to make your application work properly.</p> <p>You need to update in </p> <p>&lt;connectionStrings&gt;<br> &nbsp;&nbsp;&lt;add name=&quot;Personal&quot; connectionString=&quot;Data Source=&lt;servername or IP Address should come here&gt;;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf&quot; providerName=&quot;System.Data.SqlClient&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &lt;remove name=&quot;LocalSqlServer&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &lt;add name=&quot;LocalSqlServer&quot; connectionString=&quot;Data Source=&lt;servername or IP Address should come here&gt;;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf&quot; /&gt;<br> &nbsp; &lt;/connectionStrings&gt;</p> 2009-11-28T18:14:58-05:003538186http://forums.asp.net/p/1498116/3538186.aspx/1?Re+Don+t+work+in+my+providerRe: Don´t work in my provider <p>Hello!</p> <p>Thanks! I do it in connectionStrings, but don´t work,</p> <p>I create personal.mdf and asnetdb.mdf into another database in the server, and it´s ok!</p> <p>Now I have another problem...</p> <p>It´s only works when I put in connectionStrings user/password that I create the tables and stored procedures.</p> <p>When I try to connect with another user/password, don´t work.</p> <p>Solange</p> <p>&nbsp;</p> 2009-11-29T14:58:48-05:003538283http://forums.asp.net/p/1498116/3538283.aspx/1?Re+Don+t+work+in+my+providerRe: Don´t work in my provider <p>More detais of my problem now...</p> <p>When I try to connect with another user/password, I see this:</p> <p><span>&nbsp; </p> <h1>Server Error in '/MyPersonal' Application. <hr color="silver" size="1" width="100%"> </h1> <h2><i>Could not find stored procedure 'LM_GetNonEmptyAlbums'.</i> </h2> </span><font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><b>Description: </b>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. <br> <br> <b>Exception Details: </b>System.Data.SqlClient.SqlException: Could not find stored procedure 'LM_GetNonEmptyAlbums'.<br> <br> <b>Source Error:</b> <br> <br> <table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td><pre class="prettyprint"><pre>Line 196: connection.Open()</pre> Line 197: Dim list As New Generic.List(Of Album)() Line 198: Using reader As SqlDataReader = command.ExecuteReader Line 199: Do While reader.Read Line 200: Dim temp As New Album(CType(reader(&quot;AlbumID&quot;), Integer), 0, &quot;&quot;, False) <pre></pre></pre></TD></TR></TBODY></TABLE><BR><B>Source File: </B>D:\Solange\_My Documents\Visual Studio 2008\WebSites\LMCon1\App_Code\PhotoManager.vb<B> &nbsp;&nbsp; Line: </B>198 <BR><BR><B>Stack Trace:</B> <BR><BR> <TABLE width="100%" bgColor=#ffffcc> <TBODY> <TR> <TD><pre class="prettyprint"><PRE>[SqlException (0x80131904): Could not find stored procedure 'LM_GetNonEmptyAlbums'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932 System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31 System.Data.SqlClient.SqlDataReader.get_MetaData() +62 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122 System.Data.SqlClient.SqlCommand.ExecuteReader() +84 PhotoManager.GetRandomAlbumID() in D:\Solange\_My Documents\Visual Studio 2008\WebSites\LMCon1\App_Code\PhotoManager.vb:198 PhotoManager.GetPhotos() in D:\Solange\_My Documents\Visual Studio 2008\WebSites\LMCon1\App_Code\PhotoManager.vb:93 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct&amp; sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +308 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29 System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object&amp; instance) +480 System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1960 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.FormView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.FormView.EnsureDataBound() +163 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +50 System.Web.UI.Control.PreRenderRecursiveInternal() +170 System.Web.UI.Control.PreRenderRecursiveInternal() +170 System.Web.UI.Control.PreRenderRecursiveInternal() +170 System.Web.UI.Control.PreRenderRecursiveInternal() +170 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041 </PRE></pre></td> </tr> </tbody> </table> <br> <hr color="silver" size="1" width="100%"> <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 </font> <p></p> <p>&nbsp;</p> 2009-11-29T16:55:16-05:003608392http://forums.asp.net/p/1498116/3608392.aspx/1?Re+Don+t+work+in+my+providerRe: Don´t work in my provider <p><br> </p> <p>check is this store procedure avaiblethis store procedure can not found in your database where u r connecting<br> </p> <p><font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">LM_GetNonEmptyAlbums</font></p> 2010-01-10T09:20:43-05:00