C# .NET - Invalid object name 'dbo.aspnet_SchemaVersions'.

Asked By Tamer Hatoum
07-Nov-09 04:01 AM

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  aspnet_regsql.exe

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,
http://www.sql-server-helper.com/sql-server-2008/import-export-unknown-column-type-geography-geometry.aspx

re  re

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  nice

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
help
Error:A network-related or instance-specific error occurred The full error during Run Time: Server Error in ' / ' Application. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is
TableAdapters could be configured to use stored procedures to access data rather than ad-hoc SQL statements. In particular, we examined how to have the TableAdapter wizard automatically create these stored procedures. When porting a legacy application to ASP.NET 2.0 or when building an ASP NET 2.0 website around an existing data model, chances are that the database already contains at the steps needed to manually add new stored procedures to the database through the Visual Studio environment. Let s get started! Note: In the Wrapping Database Modifications within a Transaction tutorial modifications to the Data Access Layer code. In this tutorial we ll explore the T-SQL commands used to execute a stored procedure s statements within the scope of a transaction. Step 1: Adding Stored Procedures to the Northwind Database Visual Studio makes it easy to add new stored procedures to a database. Let s add a
visual web developer 2005 I have just installed visual web developer 2005 along with sql server express 2005 beta version. When i try to view my website via the local host i get this error message below: Server Error in ' / asp.netwebadminfiles' Application. - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - A connection was successfully established with the
Create SQL Server DataBase Programmatically Hi! I want to create the SQL Server DataBase through Programmatically with SQL Script file using ASP.Net 2005.Can anyone explain with example source , it will be more appreciated. Thanks Steps to Create a SQL Server Database loadTOCNode(2, 'summary'); To create the database, follow these steps: 1. Create a
I wanted to set up membership roles for my application to run it on remote server. I am using Visual Studio 2005 Web Development. However, I could not enter into the security tab under ASP.NET Web Site Administration Tool(In a web interface look). . . they threw me this: 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 data store. The following message may help in diagnosing the problem: Unable to connect to SQL Server database . I had previously a Express edition of Visual Studio 2005 but I uninstalled it