Invalid object name 'dbo.aspnet_SchemaVersions'.

Asked By Tamer Hatoum
07-Nov-09 04:01 AM
Earn up to 0 extra points for answering this tough question.

hello :

I am building a new application, I have created the database and created the web.config file , but I am getting this error so I tried to create that 'dbo.aspnet_SchemaVersions' manually but it still the same error. here is my web.config code:

<?xml version="1.0"?>

<configuration>

<appSettings>

<add key="ConnectionString" value="server=myserver;User ID=******;Initial Catalog=****;Password=****;"/>

<add key="OnlineTimeout" value="300"/>

</appSettings>

<system.web>

<compilation debug="true"/>

<roleManager enabled="true" ></roleManager>

<customErrors mode="Off"/>

<authentication mode="Forms">

<forms name=".UserManagementASPXAUTH" loginUrl="~/Login.aspx"/>

</authentication>

<authorization>

<allow users="*"/>

</authorization>

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

<sessionState mode="InProc" timeout="20"/>

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

</system.web>

<connectionStrings>

<remove name="LocalSqlServer" />

<add name="LocalSqlServer" connectionString="data source=myserver;Initial Catalog=abiayub_School;User ID=*******;Password=*******;" providerName="System.Data.SqlClient"/>

</connectionStrings>

</configuration>

but I am getting that error

Invalid object name 'dbo.aspnet_SchemaVersions'.

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: Invalid object name 'dbo.aspnet_SchemaVersions'.

Source Error:

Line 5:  
Line 6:  	void Application_Start(object sender, EventArgs e) {
Line 7:  		if (!Roles.RoleExists("Administrators")) Roles.CreateRole("Administrators");
Line 8:  
Line 9:          ChatProvider.Instance = new AspNetChatProvider();


Source File: c:\inetpub\vhosts\abiayubmodel.com\httpdocs\Global.asax    Line: 7

Can anybody help me to get out from that?

Regards..

  aspnet_regsql.exe

F Cali replied to Tamer Hatoum
07-Nov-09 10:11 AM

Refer to step #3 on the following link:

http://msdn.microsoft.com/en-us/library/ms998317.aspx

Create a User Store Database

The SQL Server membership provider stores user information in a SQL Server database. You can create your SQL Server user store manually by using Aspnet_regsql.exe from the command line. Alternatively, you can run Aspnet_regsql.exe in Wizard mode or use the ASP.NET Web Site Configuration tool available on the Website menu in Visual Studio .NET 2005.

To create the user store database

Use Aspnet_regsql.exe to create the membership database. From a Visual Studio 2005 command prompt, run the following command.

aspnet_regsql -S (local) -E -A m

Regards,
SQL Server Helper

  re

Web Star replied to Tamer Hatoum
07-Nov-09 11:00 AM

this article describe details about this problem

http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx

  nice

Tamer Hatoum replied to Web Star
08-Nov-09 03:26 AM

Thank you guys for the links , but my problem is that I am dealing with an hosting company and I dnt have a remote access for the server they have already created   the database.

I thought that there is any configuration I have to make n my web.config.

So I have to contact them . or is there any other way ?

Regards..

Create New Account
VIsual Studio.NET 2005 / SQL 2005 Resources VIsual Studio.NET 2005 / SQL 2005 Resources Printer Friendly Version Nigel Parker ( http: / / blogs
Visual Studio.NET 2005 - BETA 1: the Lowdown Visual Studio.NET 2005 Beta 1: The Lowdown By Peter A. Bromberg, Ph.D unforeseen event that may or may not occur." - - Dan Quayle Visual Studio.NET 2005 BETA 1 was released to the MSDN Subscriber
Sql Server 2005 Express Edition Hi All, We developed a windows based application in visual studio 2005 having SQL Server 2005 express edition as backend. We developed a setup and deploymemt install this kit in windows 2000 profesional and windows 2000 server OS. When i am installing SQL server 2005 express edition
SQL Server 2005 / Visual Studio 2003? Will I face and issues when using Visual Studio .NET 2003 to build an application that will access a database on SQL Server 2005? I have heard conflicting views on this. You can
my sql server 2005 dont allow me to connect hi, this is the message the show when i want to connect: TITLE: Connect to Server - -- -- -- -- -- -- -- -- -- -- -- -- -- -- - Cannot connect to FERNAND-PC \ SQLEXPRESS. - -- -- -- -- -- -- -- -- -- -- -- -- -- -- - ADDITIONAL INFORMATION: This version of Microsoft SQL Server Management Studio can only be used to connect to SQL Server 2000 and SQL Server 2005 servers. (ConnectionDlg) - -- -- -- -- -- -- -- -- -- -- -- -- -- -- - BUTTONS: OK - -- -- -- -- -- -- -- -- -- -- -- -- -- -- - You can't use
Visual Studio.NET 2005 Install / Uninstall Tips and Tricks Visual Studio.NET 2005 Install / Uninstall Tips and Tricks by Peter A. Bromberg, Ph the last CTP (Community Technology Preview) dropped on August 28, 2005, is now available. The .NET Framework version number on this is fixed at 2.0
Creating trigger in sql server 2005 express edition How to create trigger in sql server 2005 express edition? I am using visual studio environment. I right-clicked on table in server explorer and selected new query. i wrote "Create trigger tg_name error resume next MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion))) flex SQL Server Application Platform Optimization Download this whitepaper for a ready
SQL Server 2005 (SQLEXPRESS)- BETA 1: Hosting CLR Code Sql Server 2005 CLR Native Methods By Peter A. Bromberg, Ph.D. Peter not have a chance to read them at all. . " - - Thoreau Sql Server 2005 BETA 1 "SQLEXPRESS" was released to the MSDN Subscriber community and UDTs (User-Defined Types) written in C# or VB.NET, right inside SQL Server. Once you get the various syntax