help - how to get my site running with dicountasp.net???? -

Discussion in 'Databases' started by andy99, Jul 26, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi
    I created a small website with visual web devel.2005. - opened a webspace with discountasp.net, uploaded all, got additional sql-server, added .mdf db via supplied tool, yet can still not see my webpage. keeps bugging me with error codes.

    Seems to be with the portion of reading the data from the db. - Tables I have are two "Albums" and "Photos". Have never seen my website on the site (only locally). - Errorcode now stops at line 6.

    Can anyone out there PLEASE help me and say how to complete this code, that the page will FINALLY be viewable?? - Would appreciate your help. - Thanks Andy 99

    Tried to add the supplied code into web.config.

    1' Create Connection and Command Objects



    2 Dim connectionString As String = _


    3 "Data Source=sql2k504.discountasp.net;Initial Catalog=SQL2005_270551_sandra;User ID=SQL2005_270551_sandra_user;Password=*****"


    4 Dim connection As New SqlConnection(connectionString)


    5 Dim command As New SqlCommand( _


    6 "SELECT sysobjects.name AS 'Table' " & _


    7 "FROM sysobjects " & _


    8 "WHERE sysobjects.xtype = 'U'", _


    9 connection _


    10 )


    11


    12 ' Open Database Connection and Execute Reader


    13 connection.Open()


    14 Dim reader As SqlDataReader = command.ExecuteReader()


    15


    16' Loop Through Each Table in the Database and Display the Name


    17 While (reader.Read())


    18 Response.Write(String.Format("Database Table: {0}


    ", reader("Table")))


    19 End While


    20


    21' Close Connection


    22 connection.Close()
     
  2. Dear Aristotle
    Thanks for asking. - This is confusing. - Support had told me to take the whole script out as it wasn't allowed in the web.config file. So I did.... - I tried to reconstruct the error by putting the code in again and get only the following (different)errormessage this time, even with the settings marked as requested:
    Error-Code without the vb code in web.config: (before it stopped on the above line 6 and mentionned something i cannot clearly remember. - All I remember is, that I had to find out the table-names and support had told me to put them in, as it was looking for them. - But I didn't know where and how...
    Now (fresh) Error message when trying to view my replacement site: http://82.195.225.119/a-plus/default.aspx
    This comes now with or without the code, even if I do a refresh.

    Server Error in '/a-plus' Application.
    --------------------------------------------------------------------------------
    Runtime Error
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="Off"/>
    </system.web>
    </configuration>

    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
    </configuration>

    Just to get back to the original aim. I am trying to put my site up on the web. - I don't know if I need this piece of code (as support told me that was forbidden...). - I am just trying to see the page and the pictures and albums on it.

    Sorry that this might confuse you even more.

    I put the complete web.config below. - Maybe you have an idea what else I might have put wrong:






    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">


    <connectionStrings>


    <remove name="LocalSqlServer" />


    <add name="LocalSqlServer"


    connectionString="Data Source=sql2k504.discountasp.net;Initial Catalog=xxxxxx;


    User ID=xxxx;Password=******"


    providerName="System.Data.SqlClient" />


    </connectionStrings>


    1' Create Connection and Command Objects


    2 Dim connectionString As String = _


    3 "Data Source=sql2k504.discountasp.net;Initial Catalog=SQL2005_270551_sandra;User ID=xxxxx;Password=xxxxx"


    4 Dim connection As New SqlConnection(connectionString)


    5 Dim command As New SqlCommand( _


    6 "SELECT sysobjects.name AS 'Table' " &amp; _


    7 "FROM sysobjects " &amp; _


    8 "WHERE sysobjects.xtype = 'U'", _


    9 connection _


    10 )


    11


    12 ' Open Database Connection and Execute Reader


    13 connection.Open()


    14 Dim reader As SqlDataReader = command.ExecuteReader()


    15


    16' Loop Through Each Table in the Database and Display the Name


    17 While (reader.Read())


    18 Response.Write(String.Format("Database Table: {0}


    ", reader("Table")))


    19 End While


    20


    21' Close Connection


    22 connection.Close()


    <pages styleSheetTheme="White"/>


    <customErrors mode="Off"/>


    <compilation debug="false"/>


    <authentication mode="Forms">


    <forms loginUrl="Default.aspx" protection="Validation" timeout="300" />


    </authentication>


    <authorization>


    <allow users="*"/>


    </authorization>


    <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>


    <roleManager enabled="true"/>


    <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">


    <providers>


    <add name="XmlSiteMapProvider"


    description="SiteMap provider which reads in .sitemap XML files."


    type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"


    siteMapFile="web.sitemap"


    securityTrimmingEnabled="true"/>


    </providers>


    </siteMap>


    </system.web>


    <location path="Admin">


    <system.web>


    <authorization>


    <allow roles="Administrators"/>


    <deny users="*"/>


    <customErrors mode="Off"/>


    </authorization>


    <customErrors mode="Off"/>


    </system.web>


    </location>


    </configuration>
    Do truly appreciate your asking though.
    Andy99



    Post Edited By Moderator (bruce [DASP]) : 7/26/2006 10:55:15 PM GMT
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    woo... hold on..


    Why are you adding code to the web.config file? Web.config is a configuration file which has very rigid syntax. It should only contain configuration informaton.





    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. oki - I guess I made some big mistakes.. - i had to add my mdf-files to the SQL-DB2005. - There was this sample code, and as it didn't work I tried it. - Then support kept telling me what I had to change there, so I thought that was necessary...


    and just found another uuupso: - Errorcode on the link I am supposed to look:


    which is: http://aplusch0000.web135.discountasp.net/


    is as follows (after taking out the code again...)



    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 'configuration' start tag on line 2 does not match the end tag of 'system.web'. Line 30, position 4.

    Source Error:





    Code:
    Line 28: 			</providers>
    Line 29: 		</siteMap>
    Line 30: 	</system.web>
    Line 31: 	<location path="Admin">
    Line 32: 		<system.web>
    Source File: E:\web\aplusch0000\htdocs\web.config Line: 30






    Version Information:Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 <!--
    [XmlException]: The 'configuration' start tag on line 2 does not match the end tag of 'system.web'. Line 30, position 4.
    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
    at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
    at System.Xml.XmlTextReaderImpl.ParseEndElement()
    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlTextReader.Read()
    at System.Xml.XmlTextReaderImpl.Skip()
    at System.Xml.XmlTextReader.Skip()
    at System.Configuration.XmlUtil.StrictSkipToNextElement(ExceptionAction action)
    at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(XmlUtil xmlUtil, String parentConfigKey, Boolean inLocation, String locationSubPath, Boolean lockChildren, Boolean skipInChildApps)
    at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
    [ConfigurationErrorsException]: The 'configuration' start tag on line 2 does not match the end tag of 'system.web'. Line 30, position 4. (E:\web\aplusch0000\htdocs\web.config line 30)
    at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
    at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
    at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
    at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
    at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
    at System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName)
    at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)
    at System.Web.Configuration.RuntimeConfig.get_HealthMonitoring()
    at System.Web.Configuration.HealthMonitoringSectionHelper..ctor()
    at System.Web.Management.HealthMonitoringManager..ctor()
    at System.Web.Management.HealthMonitoringManager.Manager()
    at System.Web.Management.WebBaseEvent.RaiseRuntimeError(Exception e, Object source)
    at System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow, Boolean localExecute)
    at System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e)
    --><!--
    This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
    Does this maybe help???

    Andy99
     
  5. he 'configuration' start tag on line 2 does not match the end tag of 'system.web'. Line 30, position 4.

    open the xml file in IE. If IE complains about an error, then it is invalid.

    you must have your tags in order.

    good: <tag1><tag2></tag2></tag1>

    bad: <tag1><tag2></tag1></tag2>


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  6. ok, I found one of the tags that was wrong. - Below the actual web.config in IE-Version.


    with this I get the following errors:



    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: Unrecognized configuration section pages.

    Source Error:





    Code:
    Line 8:           providerName="System.Data.SqlClient" />
    Line 9:              </connectionStrings>
    Line 10:       <pages styleSheetTheme="White"/>
    Line 11:     <customErrors mode="Off"/>
    Line 12:     <compilation debug="false"/>
    Source File: E:\web\aplusch0000\htdocs\web.config Line: 10



    Show Additional Configuration Errors:





    Code:
    Unrecognized configuration section customErrors. (E:\web\aplusch0000\htdocs\web.config line 11)
    
    Unrecognized configuration section compilation. (E:\web\aplusch0000\htdocs\web.config line 12)
    
    Unrecognized configuration section authentication. (E:\web\aplusch0000\htdocs\web.config line 13)
    
    Unrecognized configuration section authorization. (E:\web\aplusch0000\htdocs\web.config line 16)
    
    Unrecognized configuration section globalization. (E:\web\aplusch0000\htdocs\web.config line 19)
    
    Unrecognized configuration section roleManager. (E:\web\aplusch0000\htdocs\web.config line 20)
    
    Unrecognized configuration section siteMap. (E:\web\aplusch0000\htdocs\web.config line 21)
    
                          
    <script type=text/javascript>
    function OnToggleTOCLevel1(level2ID)
    {
    var elemLevel2 = document.getElementById(level2ID);
    if (elemLevel2.style.display == 'none')
    {
    elemLevel2.style.display = '';
    }
    else {
    elemLevel2.style.display = 'none';
    }
    }
    </script>





    Version Information:Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 <!--
    [ConfigurationErrorsException]: Unrecognized configuration section pages. (E:\web\aplusch0000\htdocs\web.config line 10)
    at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
    at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
    at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
    at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
    at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
    at System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName)
    at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)
    at System.Web.Configuration.RuntimeConfig.get_HealthMonitoring()
    at System.Web.Configuration.HealthMonitoringSectionHelper..ctor()
    at System.Web.Management.HealthMonitoringManager..ctor()
    at System.Web.Management.HealthMonitoringManager.Manager()
    at System.Web.Management.WebBaseEvent.RaiseRuntimeError(Exception e, Object source)
    at System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow, Boolean localExecute)
    at System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e)
    ---
    [ConfigurationErrorsException]: Unrecognized configuration section customErrors. (E:\web\aplusch0000\htdocs\web.config line 11)
    ---
    [ConfigurationErrorsException]: Unrecognized configuration section compilation. (E:\web\aplusch0000\htdocs\web.config line 12)
    ---
    [ConfigurationErrorsException]: Unrecognized configuration section authentication. (E:\web\aplusch0000\htdocs\web.config line 13)
    ---
    [ConfigurationErrorsException]: Unrecognized configuration section authorization. (E:\web\aplusch0000\htdocs\web.config line 16)
    ---
    [ConfigurationErrorsException]: Unrecognized configuration section globalization. (E:\web\aplusch0000\htdocs\web.config line 19)
    ---
    [ConfigurationErrorsException]: Unrecognized configuration section roleManager. (E:\web\aplusch0000\htdocs\web.config line 20)
    ---
    [ConfigurationErrorsException]: Unrecognized configuration section siteMap. (E:\web\aplusch0000\htdocs\web.config line 21)
    --><!--
    This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->










    - <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">


    - <connectionStrings>


    <remove name="LocalSqlServer" />

    <add name="LocalSqlServer" connectionString="Data Source=sql2k504.discountasp.net;Initial Catalog=SQL2005_270551_sandra; User ID=SQL2005_270551_sandra_user;Password=Picass0" providerName="System.Data.SqlClient" />
    </connectionStrings>

    <pages styleSheetTheme="White" />

    <customErrors mode="Off" />

    <compilation debug="false" />

    - <authentication mode="Forms">


    <forms loginUrl="Default.aspx" protection="Validation" timeout="300" />
    </authentication>

    - <authorization>


    <allow users="*" />
    </authorization>

    <globalization requestEncoding="utf-8" responseEncoding="utf-8" />

    <roleManager enabled="true" />

    - <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">


    - <providers>


    <add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true" />
    </providers>
    </siteMap>

    - <location path="Admin">


    - <system.web>


    - <authorization>


    <allow roles="Administrators" />

    <deny users="*" />

    <customErrors mode="Off" />
    </authorization>

    <customErrors mode="Off" />
    </system.web>
    </location>
    </configuration>
     
  7. Bruce

    Bruce DiscountASP.NET Staff

  8. Thanks Bruce and Joel for the input.


    Bruce: - what does this mean this aspnet_check Schema Version??


    Joel: - I created the rules. I hope it doesn't mather that this is on a different web-name (as I opened a fresh one


    according to the instructions...).


    Below now the actual errors:



    Server Error in '/' Application.


    Object reference not set to an instance of an object.


    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.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:





    Code:
    Line 191:
    Line 192:	Public Shared Function GetRandomAlbumID() As Integer
    Line 193:		Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Personal").ConnectionString)
    Line 194:			Using command As New SqlCommand("GetNonEmptyAlbums", connection)
    Line 195:				command.CommandType = CommandType.StoredProcedure
    Source File: E:\web\aplusch0000\htdocs\App_Code\PhotoManager.vb Line: 193

    Stack Trace:





    Code:
    [NullReferenceException: Object reference not set to an instance of an object.]
       PhotoManager.GetRandomAlbumID() in E:\web\aplusch0000\htdocs\App_Code\PhotoManager.vb:193
       PhotoManager.GetPhotos() in E:\web\aplusch0000\htdocs\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) +296
       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) +482
       System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2040
       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() +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.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
    




    Version Information:Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 <!--
    [NullReferenceException]: Object reference not set to an instance of an object.
    at PhotoManager.GetRandomAlbumID() in E:\web\aplusch0000\htdocs\App_Code\PhotoManager.vb:line 193
    at PhotoManager.GetPhotos() in E:\web\aplusch0000\htdocs\App_Code\PhotoManager.vb:line 93
    [TargetInvocationException]: Exception has been thrown by the target of an invocation.
    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)
    at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
    at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
    at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
    at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
    at System.Web.UI.WebControls.FormView.DataBind()
    at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
    at System.Web.UI.WebControls.FormView.EnsureDataBound()
    at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()
    at System.Web.UI.Control.EnsureChildControls()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    [HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
    at System.Web.UI.Page.HandleError(Exception e)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest()
    at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
    at System.Web.UI.Page.ProcessRequest(HttpContext context)
    at ASP._default_aspx.ProcessRequest(HttpContext context)
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    --><!--
    This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->
     
  9. aspnet_CheckSchemaVersion does not exist in the database you are connecting to.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  10. so - thanks for the typs... - had some clean-up to do.


    below the actual config file.


    Now i got following error-codes:



    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:





    Code:
    Line 5:  	Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)
    Line 6:  		AddHandler SiteMap.SiteMapResolve, AddressOf Me.AppendQueryString
    Line 7:  		If (Roles.RoleExists("Administrators") = False) Then
    Line 8:  			Roles.CreateRole("Administrators")
    Line 9:  		End If
    Source File: E:\web\aplusch0000\htdocs\global.asax Line: 7

    Stack Trace:





    Code:
    [SqlException (0x80131904): Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857418
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +735030
       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&amp; schemaVersionCheck) +367
       System.Web.Security.SqlRoleProvider.CheckSchemaVersion(SqlConnection connection) +65
       System.Web.Security.SqlRoleProvider.RoleExists(String roleName) +482
       System.Web.Security.Roles.RoleExists(String roleName) +242
       ASP.global_asax.Application_Start(Object sender, EventArgs e) in E:\web\aplusch0000\htdocs\global.asax:7
    




    Version Information:Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 <!--
    [SqlException]: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'.
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
    at System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck)
    at System.Web.Security.SqlRoleProvider.CheckSchemaVersion(SqlConnection connection)
    at System.Web.Security.SqlRoleProvider.RoleExists(String roleName)
    at System.Web.Security.Roles.RoleExists(String roleName)
    at ASP.global_asax.Application_Start(Object sender, EventArgs e) in E:\web\aplusch0000\htdocs\global.asax:line 7
    --><!--
    This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->








    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">


    <connectionStrings>


    <remove name="LocalSqlServer" />


    <add name="LocalSqlServer"


    connectionString="Data Source=sql2k504.discountasp.net;Initial Catalog=SQL2005_270551_sandra;


    User ID=SQL2005_270551_sandra_user;Password=Picass0"


    providerName="System.Data.SqlClient" />


    </connectionStrings>


    <system.web>


    <customErrors mode="Off"/>


    <compilation debug="true"/>


    <authentication mode="Forms">


    <forms loginUrl="Default.aspx" protection="Validation" timeout="300" />


    </authentication>


    <authorization>


    <allow users="*"/>


    </authorization>


    <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>


    <roleManager enabled="true"/>


    <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">


    <providers>


    <add name="XmlSiteMapProvider"


    description="SiteMap provider which reads in .sitemap XML files."


    type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"


    siteMapFile="web.sitemap"


    securityTrimmingEnabled="true"/>


    </providers>


    </siteMap>


    </system.web>


    <location path="Admin">


    <system.web>


    <authorization>


    <allow roles="Administrators"/>


    <deny users="*"/>


    <customErrors mode="Off"/>


    </authorization>


    </system.web>


    </location>


    </configuration>
     
  11. just tried with Integrated security=false
    same result.. - server still shows Personal.mdf attached...
     
  12. By the way - "Personal.mdf" is replaced in the string by the "Initial-Catalog..."


    that is, that's I guess how the Beta-Tool attaches the MDF to the Catalog = Database on the


    SQL2005 Server.. - or do I get that wrong?
     
  13. If the suspiction is correct - is there a way to trouble-shoot the beta-tool, that


    attaches the .mdf to the Sql-DB - or the other way round - is there a better


    way of making sure that this attach is stable and correct?


    (or am I shooting way over target here?)
     
  14. Did you solve the problem withthe connection string named 'Personal' and yourweb.configconnection string named 'LocalSqlServer'?


    Are you getting a new error message now?



    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  15. Bruce

    Bruce DiscountASP.NET Staff

    Andy,


    I don't mean to be rude but I just wonder how much programming background do you have.


    I think it is really difficult for you to get a grasp on this if you do not have much programming background.


    Microsoft keeps pushing that their starter kits used along with Visual Web Developer is so easy to use and it doesn't need much programming skill. I think this is a bogus statement!!


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  16. hello Joel


    Sorry, - no - still at the same place. - Adding the integrated security didn't change a thing.
     
  17. Bruce


    You're not rude - just straight to the point. - I don't have much programming background indeed.


    You are correct - this is way over my head. - I was glad when the thing ran on my laptop - and


    it looks great. - I was looking for a provider where I could publish it - (from HTML-background,


    that was usually a no-brainer). - But I am stuck here. - No way out. - Will just need to drop it.


    Stupid. - An easy web-page-design, all uploaded, a data-base- and this is already way over


    my head... to publish it... - it's indeed frustrating - and I agree with you - this is truly nothing


    for half-breads.. - Well nevertheless - I get help or I have to let the program die. - As easy as


    that.
     
  18. ConfigurationManager.ConnectionStrings("Personal").ConnectionString is null. Probably a misconfiguration in the web.config.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  19. Hm - Thanks Joel - "Personal.mdf" is the name of the original database, but that


    is supposed to be connected...





    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">


    <connectionStrings>


    <remove name="LocalSqlServer" />


    <add name="LocalSqlServer"


    connectionString="Data Source=sql2k504.discountasp.net;Initial Catalog=SQL2005_270551_sandra;


    User ID=SQL2005_270551_sandra_user;Password=*****"


    providerName="System.Data.SqlClient" />


    </connectionStrings>
     
  20. You are looking for a connection string named 'Personal', but your web.config only has a connection string named 'LocalSqlServer'.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  21. or am I supposed to add the "Integrated Security"?? - or could that be a missmatch now after putting up the rules?
     
  22. Yes, I am looking for the local sql server because the original 2005Express, where the Personal.mdf originated, cannot communicate:


    - So I had to attach that one to the local sql server - it shows as attached...
     
  23. Bruce

    Bruce DiscountASP.NET Staff

    I am so sorry it didn't work out. I wish we could have done more for you.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  24. Ok, after installing the SQL-controls it looks better again, so next try.


    next problem: - Trying to install the SQL2005 access as in KB mentionned above I get the following errormessage:


    When I run aspnet_regsql.exe -S... from Dos-Prompt indicated I get:


    Error executing "InstallCommon.sql". SQL-errornumber is 262 and SqlExeption-message is:
    CREATE DATABASE permission denied in database 'master'.
    Creating the SQL2005_270551-sandra database...
    SQL-Server: sql2k504.discountasp.net
    Database: [SQL2005_270551-sandra]
    loaded SQL:
    InstallCommon.sql

    not executed order:


    DECLARE @dbname nvarchar<128>
    DECLARE @dboptions nvarchar<1024>


    SET @dboptions = N' /**/'
    SET @dbname = N'SQL2005_270551-sandra'


    IF <NOT EXISTIS <SELECT name
    FROM master.dbo.sysdatabases
    WHERE name =@dbname>>
    BEGIN
    PRINT 'Creating the ' + @dbname + ' database...'
    DECLARE @cmd nvarchar<500>
    SET @cmd = 'CREATE DATABASE [' + @dbname + '] ' + @dboptions
    EXEC<@cmd>
    END


    SQL-Exception: CREATE DATABASE permission denied in database 'master'.
    Creating the SQL2005_270551-sandra database...
    at System.Data.SqlClient.SqlConnection.OnError<SqlException exception;
    Boolean breakConnection\
    at System.Data.SqlClient.SqlInternalConnection.OnError<SQLException;
    Boolean breakConnection>
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning<TdsParserStateObject
    stateObj>
    at System.Data.SqlClient.TdsParser.Run<RunBehavior run Behavior, SqlCommand
    cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler;
    TdsParserStateObject stateObj>
    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds<String methodName,
    Boolean async>
    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery<DbAsyncResult
    result, String methodName, Boolean sendToPipe>
    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery<>
    at System.Web.Management.SqlServices.ExecuteFile<String file, String server,
    String database, String dbFileName, SqlConnection connection, Boolean
    sessionState, Boolean isInstall, SessionStateType sessionStatetype>


    If you guys are not annoyed yet, what could the cause for this error be this time?


    Thanks - Andy
     
  25. ok, I solved that problem (was due to the connection string).


    Now, I can access the dbo on the SQL2005 server. - Photos and Albums can be queryied
    via database explorer and .dbo - I actually do see the pictures. - Still runs smoothly on
    my notebook. - Yet, running it on the website I get the following error:


    It looks as if I should get close to completion. - So would appreciate if someone could help
    me in telling me what's still missing - or what I'll have to do here. - Thanks!


    Andy



    The connection name 'SQL2005_270551_sandraConnectionString' was not found in the applications configuration or the connection string is empty.


    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.InvalidOperationException: The connection name 'SQL2005_270551_sandraConnectionString' was not found in the applications configuration or the connection string is empty.

    Source Error:





    Code:
    Line 44: 
    Line 45:         <asp:sitemapdatasource id="SiteMapDataSource1" runat="server" startingnodeoffset="0" />
    Line 46:  <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SQL2005_270551_sandraConnectionString %>" SelectCommand="SELECT * FROM [Albums]"></asp:SqlDataSource>
    Line 47:  </form>
    Line 48: I have added the following lines:in Default.aspx:    Lines 170 and 171
    
    Line 168: <asp:ObjectDataSource ID="ObjectDataSource1" Runat="server" TypeName="PhotoManager" 
    
    Line 169: SelectMethod="GetPhotos">
    
    Line 170: </asp:ObjectDataSource>
    
    Line 171: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SQL2005_270551_sandraConnectionString %>" SelectCommand="SELECT * FROM [Albums]"></asp:SqlDataSource>
    
    
    
    in Default.master: Line 46
    
    Line 45:  <asp:sitemapdatasource id="SiteMapDataSource1" runat="server" startingnodeoffset="0" />
    
    Line 46:  <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SQL2005_270551_sandraConnectionString %>" SelectCommand="SELECT * FROM [Albums]"></asp:SqlDataSource>
    
    Line 47:  </form>
    
    
    
    Albums.aspx looks like this:
    
    
    
    Line 52:            <h4><a href="Photos.aspx?AlbumID=<%# Eval("AlbumID") %>"><%# Server.HtmlEncode(Eval("Caption").ToString()) %></a></h4>
    
    Line 53:            <%# Eval("Count") %> Photo(s)
    
    Line 54:        </ItemTemplate>
    
    Line 55:     </asp:DataList>
    
    Line 56:
    
    
    
    Line 57: </p>
    
    Line 58:
    
    
    
    Line 59: </div>
    
    Line 60: 
    
    Line 61: <asp:ObjectDataSource ID="ObjectDataSource1" Runat="server" TypeName="PhotoManager" 
    
    Line 62:       SelectMethod="GetAlbums">
    
    Line 63: </asp:ObjectDataSource>
    
    
    Source File: E:\web\aplusch0000\htdocs\Default.master Line: 46

    Stack Trace:





    Code:
    [InvalidOperationException: The connection name 'SQL2005_270551_sandraConnectionString' was not found in the applications configuration or the connection string is empty.]
       System.Web.Compilation.ConnectionStringsExpressionBuilder.GetConnectionString(String connectionStringName) +2955101
       ASP._default_master.__BuildControlSqlDataSource1() in E:\web\aplusch0000\htdocs\Default.master:46
       ASP._default_master.__BuildControlform1() in E:\web\aplusch0000\htdocs\Default.master:11
       ASP._default_master.__BuildControlTree(_default_master __ctrl) in E:\web\aplusch0000\htdocs\Default.master:1
       ASP._default_master.FrameworkInitialize() in E:\web\aplusch0000\htdocs\Default.master.vb:912306
       System.Web.UI.UserControl.InitializeAsUserControlInternal() +31
       System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +1978560
       System.Web.UI.Page.get_Master() +48
       System.Web.UI.Page.ApplyMasterPage() +18
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +543
    
     
  26. hmm


    if I add the string a second time like below in the actual web-config, I then get the public key error afterwards and it seems, that this
    throws the logic kind of over. - I needed the first string to get to the dbo. - But this seems to trigger the next below error message then.


    xml version="1.0" ?>

    - <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">


    - <connectionStrings>


    <remove name="LocalSqlServer" />

    <add name="LocalSqlServer" connectionString="Data Source=sql2k504.discountasp.net;Initial Catalog=SQL2005_270551_sandra;User ID=SQL2005_270551_sandra_user;Password=*****" providerName="System.Data.SqlClient" />

    <remove name="LocalSqlServer" />

    <add name="SQL2005_270551_sandraConnectionString" connectionString="Data Source=sql2k504.discountasp.net;Initial Catalog=SQL2005_270551_sandra;Persist Security Info=True;User ID=SQL2005_270551_sandra_user;Password=*****" providerName="System.Data.SqlClient" />
    </connectionStrings>

    - <system.web>


    <trace enabled="true" pageOutput="true" />

    <pages styleSheetTheme="White" />

    <customErrors mode="Off" />

    <compilation debug="true" />

    - <authentication mode="Forms">


    <forms loginUrl="Default.aspx" protection="Validation" timeout="300" />
    </authentication>

    <globalization requestEncoding="utf-8" responseEncoding="utf-8" />

    <roleManager enabled="true" />

    - <siteMap defaultProvider="XmlSiteMapProvider" enabled="true">


    - <providers>


    <add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true" />
    </providers>
    </siteMap>
    </system.web>

    - <location path="Admin">


    - <system.web>


    - <authorization>


    <allow roles="Administrators" />

    <deny users="*" />
    </authorization>
    </system.web>
    </location>
    </configuration>


    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:





    Code:
    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




    Post Edited By Moderator (Joel Thoms) : 8/1/2006 9:40:54 PM GMT
     
  27. It looks like the connection string 'SQL2005_270551_sandraConnectionString' is missing in the web.config.

    Aristotle

    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page