Hi all,
I know this has been asked many times before but I have read all of the answers and I'm afraid I don't understand them.
I have just set up a new windows 2003 server with sql server 2005. We have been given a website to work on which is written in.net but I have never used .net before. After installing the server and .net I set up my website in IIS so that it could use the .net framework. I have also imported a database in to sql server with the clients information on. My connection string is as follows:
<add key="connectString" value="server=SERVER;database=db001;uid=sa;pwd=xxxx;"/>
I navigated to the site and I am getting this error:
Server Error in '/current_site' Application.
Could not find stored procedure 'VisitRegister'.
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 'VisitRegister'.
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 'VisitRegister'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857370 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734982 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 RogueSystems.RogueSystemsHelper.RegisterVisit() +119 RogueSystems.Global.Session_Start(Object sender, EventArgs e) +220 System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +2163150 System.Web.SessionState.SessionStateModule.CompleteAcquireState() +154 System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +542 System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +90 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
|
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
Now, I have checked that the stored procedure exists in the database (it does) and I have checked that the conneciton string is correct. I believe it is but have no real way of knowing. As I said, I am new to this.
I have tried to run 'aspnet_regsql.exe' on that database but I get the following error:
Setup failed.
Exception:
An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 8152 and the SqlException message is: String or binary data would be truncated.
----------------------------------------
Details of failure
----------------------------------------
SQL Server:
Database: [db001]
SQL file loaded:
InstallCommon.sql
Commands failed:
CREATE TABLE #aspnet_Permissions
(
Owner sysname,
Object sysname,
Grantee sysname,
Grantor sysname,
ProtectType char(10),
[Action] varchar(20),
[Column] sysname
)
INSERT INTO #aspnet_Permissions
EXEC sp_helprotect
IF (EXISTS (SELECT name
FROM sysobjects
WHERE (name = N'aspnet_Setup_RestorePermissions')
AND (type = 'P')))
DROP PROCEDURE [dbo].aspnet_Setup_RestorePermissions
SQL Exception:
System.Data.SqlClient.SqlException: String or binary data would be truncated.
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.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)
I have no idea what I am doing. Please help, what should be my next step??
All the best,
K