Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 7th, 2008, 01:50 AM
Registered User
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default visiblity and authorization withhosting

 when i apply chapter 11 on my project
about authorization and visiblity pages on my project(http://aspspider.info/kingchemical/PhoneBookHome.aspx)
it work good in my machain(local)
when i host it
i get error
i want to know this proplem from me or host server
the error message
Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.
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: Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.

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): Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.]
  System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection) +800131
  System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj) +186
  System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
  System.Data.SqlClient.SqlInternalConnectionTds.Com pleteLogin(Boolean enlistOK) +33
  System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +172
  System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381
  System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
  System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173
  System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +133
  System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30
  System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject) +424
  System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject) +66
  System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject) +494
  System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection) +82
  System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
  System.Data.SqlClient.SqlConnection.Open() +111
  System.Data.Common.DbDataAdapter.FillInternal(Data Set 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.Execut eSelect(DataSourceSelectArguments arguments) +1770
  System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback) +17
  System.Web.UI.WebControls.DataBoundControl.Perform Select() +149
  System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind() +70
  System.Web.UI.WebControls.GridView.DataBind() +4
  System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound() +82
  System.Web.UI.WebControls.CompositeDataBoundContro l.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

this my web .config
<?xml version="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

<add name="PhoneBookConnectionString"
    connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|PhoneBook.mdf;Integrated Security=True;User Instance=True"
    providerName="System.Data.SqlClient" />

           Set compilation debug="true" to insert debugging
           symbols into the compiled page. Because this
           affects performance, set this value to true only
           during development.
<roleManager enabled="true" />
<customErrors defaultRedirect="~/missingPage.aspx">

<identity impersonate="true"/>
<allow users="administrator" />
<allow users="?" />
<compilation debug="true"/>
           The <authentication> section enables configuration
           of the security authentication mode used by
           ASP.NET to identify an incoming user.
<authentication mode="Forms">
<forms defaultUrl="phonebookhome.aspx" loginUrl="phonebookhome.aspx" ></forms>
           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" />
<siteMap defaultProvider="AspXmlSiteMapProvider" enabled="true">
<add name="AspXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
 siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>


Old March 7th, 2008, 01:10 PM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Usually a web host does not support SQLExpress connections. You must connect to an existing database instance. One legitimate justification for this is that the web host wants you to pay more for utilizing their SQL Server installation.

You'll need to inquire about setting up a SQL database at the web host. They will give you connection information once it's set up, then you can update your web.config appropriately.


Similar Threads
Thread Thread Starter Forum Replies Last Post
authorization denied COM+ pevl Pro VB Databases 2 July 8th, 2006 09:02 PM
Regarding authorization harshaghanta ASP.NET 2.0 Professional 1 June 5th, 2006 09:18 PM
Authorization @shish ASP.NET 1.0 and 1.1 Basics 0 March 7th, 2006 06:24 AM
Authorization of download eapsokha Classic ASP Professional 3 February 23rd, 2004 12:35 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.