I was running a DNN app on my local machine. I have now moved it to my server and am trying to get it working.
Note that I am using Godaddy hosting
ERROR IS AS FOLLOWS:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
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.SqlE
xception: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
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): Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.]
System.Data.SqlClient.SqlC
onnection.
OnError(Sq
lException
exception, Boolean breakConnection) +1953274
System.Data.SqlClient.SqlI
nternalCon
nection.On
Error(SqlE
xception exception, Boolean breakConnection) +4849707
System.Data.SqlClient.TdsP
arser.Thro
wException
AndWarning
(TdsParser
StateObjec
t stateObj) +194
System.Data.SqlClient.TdsP
arser.Run(
RunBehavio
r runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlC
ommand.Fin
ishExecute
Reader(Sql
DataReader
ds, RunBehavior runBehavior, String resetOptionsString) +204
System.Data.SqlClient.SqlC
ommand.Run
ExecuteRea
derTds(Com
mandBehavi
or cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
System.Data.SqlClient.SqlC
ommand.Run
ExecuteRea
der(Comman
dBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlC
ommand.Int
ernalExecu
teNonQuery
(DbAsyncRe
sult result, String methodName, Boolean sendToPipe) +175
System.Data.SqlClient.SqlC
ommand.Exe
cuteNonQue
ry() +137
Microsoft.ApplicationBlock
s.Data.Sql
Helper.Exe
cuteNonQue
ry(SqlConn
ection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +74
Microsoft.ApplicationBlock
s.Data.Sql
Helper.Exe
cuteNonQue
ry(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +93
Microsoft.ApplicationBlock
s.Data.Sql
Helper.Exe
cuteNonQue
ry(String connectionString, String spName, Object[] parameterValues) +87
DotNetNuke.Data.SqlDataPro
vider.Upda
teServerAc
tivity(Str
ing ServerName, String IISAppName, DateTime CreatedDate, DateTime LastActivityDate) +192
DotNetNuke.Entities.Host.S
erverContr
oller.Upda
teServerAc
tivity(Ser
verInfo server) +76
DotNetNuke.Common.Initiali
ze.Initial
izeApp(Htt
pApplicati
on app) +474
DotNetNuke.Common.Initiali
ze.Init(Ht
tpApplicat
ion app) +145
DotNetNuke.HttpModules.Req
uestFilter
.RequestFi
lterModule
.FilterReq
uest(Objec
t sender, EventArgs e) +187
System.Web.SyncEventExecut
ionStep.Sy
stem.Web.H
ttpApplica
tion.IExec
utionStep.
Execute() +68
System.Web.HttpApplication
.ExecuteSt
ep(IExecut
ionStep step, Boolean& completedSynchronously) +75
ISSUE FIX IS AS FOLLOWS:
Goto SQL Server, Find the Stored Procedure called "UpdateServerActivity" and alter it as follows (change highlighted in RED):
ALTER PROCEDURE dbo.UpdateServerActivity
@ServerName nvarchar(50),
@IISAppName nvarchar(200),
@CreatedDate datetime,
@LastActivityDate datetime
AS
DECLARE @ServerID int
-- SET @ServerID = (SELECT ServerID FROM dbo.WebServers WHERE ServerName = @ServerName AND IISAppName = @IISAppName)
SET @ServerID = (SELECT Top 1 ServerID FROM dbo.WebServers WHERE ServerName = @ServerName AND IISAppName = @IISAppName order by LastActivityDate DESC)
IF @ServerID IS NULL
BEGIN
-- Insert
INSERT INTO dbo.WebServers (
ServerName,
IISAppName,
CreatedDate,
LastActivityDate,
[Enabled]
)
VALUES (
@ServerName,
@IISAppName,
@CreatedDate,
@LastActivityDate,
0
)
END
ELSE
BEGIN
-- Update
UPDATE dbo.WebServers
SET
LastActivityDate = @LastActivityDate
WHERE ServerName = @ServerName AND IISAppName = @IISAppName
END
GO