Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Thursday, March 29, 2012

help with connectionString

Hello,

I have just tried to deploy my app from my local pc to our server and I have been getting this error.

Server Error in '/' Application.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.

Source Error:

Line 164: <providers>Line 165: <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/"Line 166: type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />Line 167: <add name="AspNetWindowsTokenRoleProvider" applicationName="/"Line 168: type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />


Source File:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config Line:166


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

I am new to SQLExpress 2005 and asp.net 2.0. I created some database files on my local pc then copied the whole app to the server. Not sure what to do.

Any help would be greatly appreciated or direction to info.

Thanks Matt

Matt,

Please make sure the membership tables already created on your production server.
Also, check your web or virtual directory is running on top of .Net 2.0

Choirul|||

You need to deploy your database to the remote server as well with the web application. You also need to update the connection string in your web.config file. For example:

<add name="LocalSqlServer" connectionString="Data Source=yournewremotelocationdatabase;Initial Catalog=table;Persist Security Info=True;User ID=yourid;Password=yourpassword" />

Hope that helps.


|||

Thanks for the help. I looked at my application and I have to we.config files. One for the entire application and one for the secured pages under the members folder.

I changed the connectionStrings in the application web.confin but there is no connectionString in the members section.

<?

xmlversion="1.0"encoding="utf-8"?>

<

configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<

system.web>

<

authorization>

<

denyusers="?" />

</

authorization>

</

system.web>

</configuration>

Using VWD it says

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem:The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty. (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config line 140)

When I try to choose the data provider it tells me:

Could not establish a connection to the database.
If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.

I then tried to run the aspnet_regsql and got:

Setup failed.

Exception:
Unable to connect to SQL Server database.

------------
Details of failure
------------

System.Web.HttpException: Unable to connect to SQL Server database. --> System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
-- End of inner exception stack trace --
at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString)
at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install)
at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString)
at System.Web.Management.ConfirmPanel.Execute()

So at this point I guess I am lost. I would appreciate any help. Can you recommend a good resource for SQLEpress learning?

Thanks Again Matt

|||The problem should be on your connectionstring. It fails searching LocalSqlServer, which is the default connectionstring name for membership database.Make sure your connectionstring name is "LocalSqlServer". If you want to use another name, you can specify it on connectionStringName of membership section in web.config.

<membership defaultProvider="AspNetSqlMembershipProvider">
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="myConnectionString"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="4"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"
passwordStrengthRegularExpression=""
applicationName="/myapp"/>
</providers>
</membership
It will help if you can post your application web.config here too :)|||

Thanks for the help. Here is the app web.config. Below is the connectionStrings for my App_Data folder.

<?

xmlversion="1.0"?>

<!--

Note: As an alternative to hand editing this file you can use the

web admin tool to configure settings for your application. Use

the Website->Asp.Net Configuration option in Visual Studio.

A full list of settings and comments can be found in

machine.config.comments usually located in

\Windows\Microsoft.Net\Framework\v2.x\Config

-->

<

configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<!--

The configSections define a section for ASP.NET Atlas.

-->

<

configSections>

<

sectionGroupname="microsoft.web"type="Microsoft.Web.Configuration.MicrosoftWebSectionGroup">

<

sectionname="converters"type="Microsoft.Web.Configuration.ConvertersSection"requirePermission="false"/>

<

sectionname="webServices"type="Microsoft.Web.Configuration.WebServicesSection"requirePermission="false"/>

<

sectionname="authenticationService"type="Microsoft.Web.Configuration.AuthenticationServiceSection"requirePermission="false"/>

<

sectionname="profileService"type="Microsoft.Web.Configuration.ProfileServiceSection"requirePermission="false"/>

</

sectionGroup>

</

configSections>

<!--

The microsoft.web section defines items required for the Atlas framework.

-->

<

microsoft.web>

<

converters>

<

addtype="Microsoft.Web.Script.Serialization.Converters.DataSetConverter"/>

<

addtype="Microsoft.Web.Script.Serialization.Converters.DataRowConverter"/>

<

addtype="Microsoft.Web.Script.Serialization.Converters.DataTableConverter"/>

</

converters>

<

webServicesenableBrowserAccess="true"/>

<!--

Uncomment this line to enable the authentication service.

<authenticationService enabled="true" />

-->

<!--

Uncomment these lines to enable the profile service. To allow profile properties to be retrieved

and modified in Atlas applications, you need to add each property name to the setProperties and

getProperties attributes. If you intend for all properties to be available, you can use "*"

as a shorthand rather than enumerating each property

-->

<!--

<profileService enabled="true"

setProperties="propertyname1;propertyname2"

getProperties="propertyname1;propertyname2" />

-->

</

microsoft.web>

<

appSettings/>

<

connectionStrings>

<

addname="MSFADatabaseConnectionStringDistrict1Blog"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\myWebApp\AtlasMSFA\App_Data\MSFADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

<

addname="MSFADatabaseConnectionStringDistrict2Blog"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\myWebApp\AtlasMSFA\App_Data\MSFADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

<

addname="MSFADatabaseConnectionStringDistrict3Blog"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\myWebApp\AtlasMSFA\App_Data\MSFADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

<

addname="MSFADatabaseConnectionStringDistrict4Blog"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\myWebApp\AtlasMSFA\App_Data\MSFADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

<

addname="MSFADatabaseConnectionStringAtLargeBlog"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\myWebApp\AtlasMSFA\App_Data\MSFADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

<

addname="MSFADatabaseConnectionStringPresidentBlog"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\myWebApp\AtlasMSFA\App_Data\MSFADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

<

addname="MSFADatabaseConnectionStringSecretaryTreasurerBlog"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\myWebApp\AtlasMSFA\App_Data\MSFADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

<

addname="MSFADatabaseConnectionStringVicePresidentBlog"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\myWebApp\AtlasMSFA\App_Data\MSFADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

</

connectionStrings>

<

system.web>

<

authorization>

<

allowroles="administrator" />

</

authorization>

<

roleManagerenabled="true" />

<

authenticationmode="Forms" />

<

pages>

<

controls>

<

addnamespace="Microsoft.Web.UI"assembly="Microsoft.Web.Atlas"tagPrefix="atlas"/>

<

addnamespace="Microsoft.Web.UI.Controls"assembly="Microsoft.Web.Atlas"tagPrefix="atlas"/>

</

controls>

</

pages>

<!--

Set compilation debug="true" to insert debugging

symbols into the compiled page. Because this

affects performance, set this value to true only

during development.

-->

<

compilationdebug="true">

<

buildProviders>

<

addextension=".asbx"type="Microsoft.Web.Services.BridgeBuildProvider"/>

</

buildProviders>

</

compilation>

<!--

ASMX is mapped to a new handler so that proxy javascripts can also be served.

-->

<

httpHandlers>

<

removeverb="*"path="*.asmx"/>

<

addverb="*"path="*.asmx"type="Microsoft.Web.Services.ScriptHandlerFactory"validate="false"/>

<!--

The MultiRequestHandler enables multiple requests to be handled in one

roundtrip to the server. Its use requires Full Trust.

-->

<

addverb="*"path="atlasbatchcall.axd"type="Microsoft.Web.Services.MultiRequestHandler"validate="false"/>

<

addverb="*"path="atlasglob.axd"type="Microsoft.Web.Globalization.GlobalizationHandler"validate="false"/>

<!--

The IFrameHandler enables a limited form of cross-domain calls to 'Atlas' web services.

This should only be enabled if you need this functionality and you're willing to expose

the data publicly on the Internet.

To use it, you will also need to add the attribute [WebOperation(true, ResponseFormatMode.Json, true)]

on the methods that you want to be called cross-domain.

This attribute is by default on any DataService's GetData method.

<add verb="*" path="iframecall.axd" type="Microsoft.Web.Services.IFrameHandler" validate="false"/>

-->

<

addverb="*"path="*.asbx"type="Microsoft.Web.Services.ScriptHandlerFactory"validate="false"/>

</

httpHandlers>

<

httpModules>

<

addname="ScriptModule"type="Microsoft.Web.Services.ScriptModule"/>

<

addname="BridgeModule"type="Microsoft.Web.Services.BridgeModule"/>

<

addname="WebResourceCompression"type="Microsoft.Web.Services.WebResourceCompressionModule"/>

</

httpModules>

<!--

The <authentication> section enables configuration

of the security authentication mode used by

ASP.NET to identify an incoming user.

<authentication mode="Windows"/>

-->

<!--

The <customErrors> section enables configuration

of what to do if/when an unhandled error occurs

during the execution of a request. Specifically,

it enables developers to configure html error pages

to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">

<error statusCode="403" redirect="NoAccess.htm"/>

<error statusCode="404" redirect="FileNotFound.htm"/>

</customErrors>

-->

</

system.web>

<!--

Uncomment this if your site globally denies access to anonymous users. The

authentication service and profile service are located under the virtual

"ScriptServices" directory. Since you normally call the authentication web

service with an un-authenticated user, the following location tag can be used

to grant access to anonymous users. If you use anonymous profile support

you will also need to grant access to anonymous users.

-->

<!--

<location path="ScriptServices">

<system.web>

<authorization>

<allow users="*" />

</authorization>

</system.web>

</location>

-->

</

configuration>

Thanks Matt

|||Hi,

You're missing the connection string for ASP.NET membership. The default name is "localSqlServer". Try to add this conn string:

<addname="localSqlServer"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\myWebApp\AtlasMSFA\App_Data\MSFADatabase.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

also, make sure you've added membership tables in MSFADatabase.mdf.

If you want another name instead of "localSqlServer", please refer to my previous post :)


|||

Thanks for the Help. That seamed to fix that problem. I really appreciate it. My Default.aspx page came up. But when I try to navigate to a page containing a database this is what I get.

Server Error in '/' Application.

An attempt to attach an auto-named database for file C:\myWebApps\AtlasMSFA\App_Data\MSFADatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

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.Data.SqlClient.SqlException: An attempt to attach an auto-named database for file C:\myWebApps\AtlasMSFA\App_Data\MSFADatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

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:

[SqlException (0x80131904): An attempt to attach an auto-named database for file C:\myWebApps\AtlasMSFA\App_Data\MSFADatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.] System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +437 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 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.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

And also when I try to login in I get this.

Server Error in '/' Application.

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

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.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

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:

[SqlException (0x80131904): Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857306 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734918 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135 System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +367 System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +85 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160 System.Web.UI.WebControls.Login.AttemptLogin() +105 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Thank you again for the help.

Thanks Matt

|||hi,
Make sure SQLExpress is running on your deployment server, and asp.net membership tables is already exists in MSFADatabase.mdf.
You may need to change the path for database file as follow, so it will search your deployement folder accordingly, instead of hardcoded the database file location.

<

addname="MSFADatabaseConnectionStringDistrictBlog"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|MSFADatabase.mdf; Integrated Security=True;Connect Timeout=30;User Instance=True"providerName="System.Data.SqlClient" />

<

|||

Thank you again for the help. I have tried your suggestion and it did not seam to work. Also I have checked my application and the tables all appear to be there. It looks like all the data copied correctly from my local pc to my server. I am able to right click on the asnet_Membership table, select "Show Table Data", and view the users I have created. Also the MSFADatabase.mdf table are there and the data.

I have tried to use the ASP.NET Website Administration Tool. When I click the security tab this is the error I get,

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem:Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

When I choose the data store it is able to successfully connect toAspNetSqlProvider.

I am not sure what is going on.

How can I check to make sure SQLExpress 2005 is running?

Thanks you again.

Matt

|||hi,

run sqlcmd -L in your command prompt, it will display any sql server instance in your network. Make sure sqlexpress is up in production server.

About error regarding to reole provider, add this section in your web.config:

<roleManager enabled="true">
<providers>
<clear/>
<add connectionStringName="yourconnectionstringname" applicationName="/yourapplicationname" name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<remove name="AspNetWindowsTokenRoleProvider"/>
</providers>
</roleManager
don't forget to repace connstringname and application name accordingly|||

Once again thank you for the help. Running sqlcmd-L helped with the one part. I appreciate all your help. I still can seem to get the login in to work. I am still getting:

Server Error in '/' Application.

Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

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.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.

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:

[SqlException (0x80131904): Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857306 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734918 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135 System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +367 System.Web.Security.SqlMembershipProvider.CheckSchemaVersion(SqlConnection connection) +85 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160 System.Web.UI.WebControls.Login.AttemptLogin() +105 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

I have checked the event log on my server and am getting a couple of errors.

Event ID: 17401, MSSQL$SQLEXPRESS and Event ID: 1309 ASP.NET 2.0.50727.0

If I am correct this has something to do with the SQLExpress being idle? I don't believe that it is a timeout problem as the error comes up immediately.

Any Ideas?

Thanks Matt

|||Did you check if'dbo.aspnet_CheckSchemaVersion' really exists in your database?|||

No. I am not sure what that is? It does not look like it is there if I explore the database.

Thanks Matt

Monday, March 26, 2012

Help with backups

Hi, I have a SQL server running on a remote network. On my local machine I
have the SQL client tools in which I use to connect to the SQL server. How
can I perform a backup locally. When I try, it looks at the remote drives
rather then my local drives when I try to backup to my local folder.
Thanks
David
You might try this:
backup database DB1 to disk = '\\mymachine\c:\mssql\backups\DB1_date.bck'
You could run that via SQL Analyzer or put it into a script or job.
hth.
"David" <dross@.si.rr.com> wrote in message
news:um2RfUZdEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Hi, I have a SQL server running on a remote network. On my local machine
I
> have the SQL client tools in which I use to connect to the SQL server.
How
> can I perform a backup locally. When I try, it looks at the remote drives
> rather then my local drives when I try to backup to my local folder.
> Thanks
> David
>
sql

Help with backups

Hi, I have a SQL server running on a remote network. On my local machine I
have the SQL client tools in which I use to connect to the SQL server. How
can I perform a backup locally. When I try, it looks at the remote drives
rather then my local drives when I try to backup to my local folder.
Thanks
DavidYou might try this:
backup database DB1 to disk = '\\mymachine\c:\mssql\backups\DB1_date.bck'
You could run that via SQL Analyzer or put it into a script or job.
hth.
"David" <dross@.si.rr.com> wrote in message
news:um2RfUZdEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Hi, I have a SQL server running on a remote network. On my local machine
I
> have the SQL client tools in which I use to connect to the SQL server.
How
> can I perform a backup locally. When I try, it looks at the remote drives
> rather then my local drives when I try to backup to my local folder.
> Thanks
> David
>

Help with backups

Hi, I have a SQL server running on a remote network. On my local machine I
have the SQL client tools in which I use to connect to the SQL server. How
can I perform a backup locally. When I try, it looks at the remote drives
rather then my local drives when I try to backup to my local folder.
Thanks
DavidYou might try this:
backup database DB1 to disk = '\\mymachine\c:\mssql\backups\DB1_date.bck'
You could run that via SQL Analyzer or put it into a script or job.
hth.
"David" <dross@.si.rr.com> wrote in message
news:um2RfUZdEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Hi, I have a SQL server running on a remote network. On my local machine
I
> have the SQL client tools in which I use to connect to the SQL server.
How
> can I perform a backup locally. When I try, it looks at the remote drives
> rather then my local drives when I try to backup to my local folder.
> Thanks
> David
>

Friday, March 23, 2012

help with accessing reportserver with web browser

I am using sql express w/ advanced services on xp pro with IIS 5.1 installed. On the local machine named 'Tester' i am able to access reportserver using a web browser and the url: http://localhost/reportserver. But when i go to another machine on the same network and domain and try to access the reportserver with url: http://Tester.domain/reportserver or http://<ip address of Tester>/reportserver ie tells me page cannot be found and does not give me any errors. How do I set up network access to reportserver on the machine Tester? Help would be greaty appreciated.

Try and turn off Windows Firewall to see if that helps.

To troubleshoot, you should be able to telnet to port 80 from the other machine.

cheers,

Andrew

Friday, March 9, 2012

HELP US MICROSOFT: SYNCH BETWEEN SQL EXPRESS AND SQL MOBILE

Hi Everyone

As most of you do, I am eagerly awaiting the ability to synchronize my sql mobile database on the hand held to a local sql express database on my local machine

I know users in Microsoft have pointed out to us that we are getting things for free.

At the same time, Microsoft is getting our patience for free and at a cost to us developers.

Its nearly April and as one article says Microsoft will release a fix for this inadequacy

Microsoft...we are happy to pay for this. Palm offers it so what is the big deal. Its not the

reinvention of the wheel. We would have liked that instead of the server synchronization

that bypasses the local sql express database

I as many others are happy to pay

Please let us know when you will be addressing this problem.

I would appreciate the feedback and frustration of other developers. Maybe this will show them we are really running out of time with our clients

Regards

Touraj

Can you point to do the article that says Microsoft will release a fix for this as I am curious?|||

Still, even if someone from Microsoft hasnt said this rather than a prominent person in the MVP area, it doesnt defeat the purpose of the Topic.

We need this as our clients are screaming for this functionality.

Please just answer this simple question. WHEN?

Touraj

|||I agree that this needs to be addressed and a schedule would be helpful. I don't see why the merge/snapshot publication capability exists in MSDE 2000 but not in SQL 2005. The "free" argument breaks down when you realize that the earlier version of the database runtime could do this.|||

Hi Skip

thanks for replying

for a second i thought i was the only person interested in this feature and thought maybe i had missed something...that was until my client who is a multinational screamed at me again on the phone

Anyone....can anyone from Microsoft please tell us SOMETHING

and not ignore us. We are the customers. Please tell us anything so that we know you guys actually do read our opinions

Darren Shaffer...i really respect you....can you say anything...

Touraj

|||

Appreciate your feedback. The requirement for syncing SQL Mobile with SQL Express has been raised earlier. The issue is not that both the products are free but given the time and resources that the SQL Mobile team has can all the requirements be handled effectively. There are quite a few requirements on the plate of the team and the requirements need to be prioritized so that the maximum value is generated given the constraints. The following helps in moving things up in the priority of the Product Team:

1) The criticality of the requirement - How big is the deployment? What will happen if the feature is not made available? What is the future growth rate of the application

2) No of Applications that are affected by not having the feature - How many of the SQL Mobile Application Developer community is affected by not having this feature

3) Customer scenarios - What are the customer business scenarios that are not being solved by not having this feature

Regards

Ambrish

|||This isn't the whole picture by the way.
MSDE indeed supports merge replication, it can be configured as distributor and can make publications. I've spent quite some time making scripts to configure newly installed MSDE instance for my needs and I was quite happy with the results - MSDE made me a snapshot on given schedule.
Then it came to synchronizing with ppc... First issue is that you can't install sqlce server tools with no SQL Server installed - it just doesn't seem to be able to locate the presence of MSDE. For testing purposes I've installed SQL Server and sqlce server tools, configured IIS with it (though you can make a virtual folder with sqlce server agent and set all access rights manually). I was able to browse the site with sqlce server agent from ppc and run the agent, but when it came to synchronizing, same error appeared over and over "29045: Initializing SQL Server Reconciler has failed" on MSDE. Switching to SQL Server solves the problem - merge replication works fine, but I need same functionality with MSDE. Official documentation states that it can be done, but it doesn't points to HOW it can be done.
|||

I appreciate your feedback

I also appreciate your priortities may be different than the simple user out there.

But as a company director of a growing mobile application business I can safely say that our business is being impacted by this gap in functionality

1) The functionality of Local Sync between a hand held and SQL Express is CRITICAL

This is irrespective of the size of the project/deployment. Customers and their internal IT department are staggered and laughing at us and Microsoft when they find out its not available.

Remember this is something that is made freely available in palm desktop and should be offered.

The growth rate of our applications will soon cease to exist under the SQL mobile platform if this isnt resolved. Customers do not want devices synching with their servers via IIS.

Eg When you are dealing with Mining companies do you think there is a server out in the mine or the office. NO

There is a rugged laptop running a .NET application for which the user needs to synch information to and from his hand held. This lack of functionality has now cost us one major tender and a whole industry. So what do we do.

I wouldnt even touch Appforge. They at least offer local synch for Palm DB and Access but their scalability is poor

So where does that leave us. Very frustrated because the business is being hurt by our loyalty. So we as well as many other vendors who we have met at exhibitions are deciding to leave if this isnt addressed quick

2) Again 100% of the application developer community. I can safely say this as I have a hand on the pulse of this matter. I think without going into technical aspects, simply from a user/customer point of view this is the sole reason that we dump your technology and decide to use another one.

This is mission critical. One reason I am passionate is that you have 99% of what we need

This 1% is what is causing the 99% to be useless. I cant say it more clearer than that

3) Once again..,.I can give you 100 scenarios.

You are asking us to accept

"a user having to synch a hand held with a server. the process would leave the SQL Express out of synch as it does not partake in that process unless you trigger another synch between SQL Express and SQL Server"

Besides it being a completely poor design we cant accomplish this in scenarios like mobile sales forces, mining, telecommunications and so on when the Server isnt there to act as the middle man. I just cant understand why i even have to explain this to you guys seeing it is so obvious.

This is where you will beat IBM who is currently buying up and looking at industry specific solutions.

With Microsoft our business will soon fail to operate using your technology. Forget about being industry specific and creating solutions. They convenience of mobility is made useless if you are restricted in such a way

You can call me and I can discuss it with more factual details which I will not post here

Suffice to say that losing our company will not be a once off loss in loyatly. We are an example of the widespread dismay and frustration with SQL Mobile

Touraj

|||I'm with Touraj on this matter. For SQL Mobile direct merging with a lightweight desktop DB such as SQL Express (or MSDE) is needed very much to develop an easy-to-deploy lightweight applications|||

Thanks Zheka

I am surprised no one else is adding their thoughts to this topic

Can someone from Microsoft tell us...do we need to organise a petition

or what are the formal process to get this escalated

|||

Touraj,

By way of encouragement, I can assure you that Microsoft has heard your feedback - there have been several internal discussions I have participated in on the topic of providing merge replication with a lightweight database on the server/PC. We're talked about SQL Mobile server tools for MSDE, peer to peer SQL Mobile to SQL Mobile replication, and some other options as well.

To give you some perspective on this issue, what SQL Express is lacking is more than just a set of server tools for SQL Mobile replication. There are some major, integral components missing from SQL Express which would be needed to support merge replication, including a SQL Agent, a Distribution Database and capability, Replication Monitor, and the ability to define publications and serve as a publisher to name a few. So given that, in my opinion, Microsoft is not likely to come out with a way to bolt all of that on to SQL Express as it exists today - it would effectively be the same as bringing SQL Express up to SQL Server 2005 Standard Edition.

So the real problem is there is no MSDE-equivalent that supports merge replication available with the 2005 set of dev tools. In my opinion (and this is only my opinion), Microsoft lost money on MSDE because an awful lot of people used it in pseudo production environments with 5 or fewer concurrent connections. So retiring it does encourage adoption of SQL Server 2005 standard or better edition, which is an improvement in revenue for the company.

I guess what I am saying is that I don't believe relief is coming in the next few days or weeks based on how large the effort would be to solve this problem (not just technically, but from a marketing, documentation, and distribution standpoint). So you are going to need to consider an alternate option while this issue is being addressed. Here are some options that other people are evaluating or have working now:

1. use web services and roll your own data sychronization between SQL Mobile and SQL Express (this would be my choice in your situation unless you have multiple mobile users changing the same data between synchronization events)

2. use SQL Server 2005 Standard Edition on the server if budget permits

3. use a third party synch tool - I just saw a note from someone at IntelliSync claiming that their Data Synch product has the ability to synchronize SQL Mobile to SQL Express. I have not personally tested that nor do I know what it costs, I'm just passing along that they have made the claim.

4. if your application has a "batch-mindset", meaning you populate a SQL Mobile Database, put it on device, work with it all day, and then copy it back to a server and extract the data, you can use a programmatic approach to synchronizing the data. Tools from www.primeworks.pt are excellent for this.

I will continue to emphasize to Microsoft in my internal discussions with them how important the issue is and if a solution becomes finalized, I'll communicate that here and in the public newsgroup.

-Darren

|||

Dear Darren

My sincere thanks for your detailed response. I think you should be running the development division at Microsoft because it is real shame and eye opener when an external consultant is answering these type of questions and we are being treated like fools by Microsoft employees who run you through the same time wasting exercise and questions

I thankyou for your answers and advice. But the question remains why arent we as customers getting these answers from a Microsoft person. Absolutely ridiculous

Regards

Touraj

|||

to be honest I think you are pretty much telling to good guys at Microsoft to do all the work for you - this is really not the way to go, nor will it ever happen. Microsoft has done HELL OF ALOT for developers and customers and yet they still get negitivity - outragous in my honest opinion.

putting the differences aside....

you should really handle this in "your" own way - in other words, your own mechinism. This is EASILY achieved. Use WebServices, this is what I had done on several projects of my own.

It doesnt take much time and you will be benefiting from improving your skills, using the technology more and can customize it the way you wish to - that's what it's all about.

my 10 cents ;-)

Sunday, February 26, 2012

Help SQL 2K Security :-) DBA's

Hello everyone,
Here goes another wired on... Currently I have a local test SQL server setup
on my PC. I need to give access to another (entry, verrrrrryyyy entry level)
programmer access to my local server (READ ONLY). but here goes the problem,
I discovered that the employee replicated my db and left it open causing
security issues, since the data contains lots of sensitive data. (credit
cards, soc sec, emp names, etc). Is theirs a way in SQL server to assign
field level security? for example : I want to give him access to employee
names in the employee db, but I don't want him to be able to view employees
socials? the same with customers and credit card information or to restrict
him from exporting any data/scripts. any ideas'
Thanks in advance
AlexThank u!!!!
"alex" <hjhjjhhj@.ghghhg.com> wrote in message
news:%23LWLPaEWDHA.1480@.tk2msftngp13.phx.gbl...
> Hello everyone,
> Here goes another wired on... Currently I have a local test SQL server
setup
> on my PC. I need to give access to another (entry, verrrrrryyyy entry
level)
> programmer access to my local server (READ ONLY). but here goes the
problem,
> I discovered that the employee replicated my db and left it open causing
> security issues, since the data contains lots of sensitive data. (credit
> cards, soc sec, emp names, etc). Is theirs a way in SQL server to assign
> field level security? for example : I want to give him access to employee
> names in the employee db, but I don't want him to be able to view
employees
> socials? the same with customers and credit card information or to
restrict
> him from exporting any data/scripts. any ideas'
> Thanks in advance
> Alex
>|||"alex" <hjhjjhhj@.ghghhg.com> wrote in message
news:eVCvrHFWDHA.2008@.TK2MSFTNGP11.phx.gbl...
> Thank u!!!!
>
> "alex" <hjhjjhhj@.ghghhg.com> wrote in message
> news:%23LWLPaEWDHA.1480@.tk2msftngp13.phx.gbl...
> > Hello everyone,
> >
> > Here goes another wired on... Currently I have a local test SQL server
> setup
> > on my PC. I need to give access to another (entry, verrrrrryyyy entry
> level)
> > programmer access to my local server (READ ONLY). but here goes the
> problem,
> > I discovered that the employee replicated my db and left it open causing
> > security issues, since the data contains lots of sensitive data. (credit
> > cards, soc sec, emp names, etc). Is theirs a way in SQL server to assign
> > field level security? for example : I want to give him access to
employee
> > names in the employee db, but I don't want him to be able to view
> employees
> > socials? the same with customers and credit card information or to
> restrict
> > him from exporting any data/scripts. any ideas'
> >
> > Thanks in advance
> >
> > Alex
> >
> >
I have to add one more note to this even though you've gotten your answer
and probably moved on. You said you have a "local test SQL server" setup.
You should never have legitimate, sensitive customer/employee information in
a test database. There's just no need for it, and you're taking a huge risk
of that information falling into the wrong hands. Scramble or remove the
data in the sensitive columns immediately.
If you need a legitimate CCN or SSN for testing (such as validation
routines) then pull out your wallet and use your own. Risking compromise of
a customer or employee's personal information is just insane.
Ryan LaNeve