Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Sunday, March 25, 2012

asp, trusted authentication, sql server 2000

hi...

i'm trying to write a database application using asp (not .net) and need to have it connect to SQL server 2000 using windows integrated security and trusted authentication. i have the following asp code:

DIM dbConn
set dbConn = Server.CreateObject("ADODB.Connection")
DBconn.Open "Driver={SQL Server};Server=DBSERVER;Database=MyDatabase;Truste d_Connection=yes"

i can access the page from the local webserver (http://localhost/sample.asp) but cannot access it from another machine. when i access it via another machine, it prompts for a un/pw but still says:

"Login failed for user (null). Reason: Not associated with a trusted SQL server connection"

please help...thanksHowdy,

Try setting up an ODBC connection ( make it use NT authentication ) on the web box to the SQL box and see if the problem goes away.

That may help establish where the problem is. Also, do you have same version of MDAC on web server & SQL Server boxes?

Cheers,

SG.|||i do have an odbc connection to the sql database on the web box (which currently is an xp pro machine for testing purposes, once i finish it will be moved to a 2000 server box)...how do i get it to use that specific connection?|||Try the following connection string:

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=mydatabase;Data Source=dbserver

Also, your iis configuration may not be correct.|||After a good deal of troubleshooting, I have reason to believe that my IIS server is at fault. I do not know how to configure it correctly to use integrated security. I thought I had it correct - I do not allow Anonymous access, and under Authenticated access I have:

Digest authentication for Windows domain servers is checked (I've tried not using this, and recieved the same result)

Basic authentication (password is sent in clear text) is NOT checked

Integrated Windows authentication is checked.

When logging onto the ASP page, it does prompt for a user name and password. Upon entering my AD logon/password (which does have permission on the database), it errors out, reporting Login failed for user (null). This error is the same as it appears in SQL server's logs.

I can access it directly from the server without incident. Also, if i *do* allow anonymous access and use my credentials (as opposed to IUSER_blah), I can access it successfully. Otherwise, it reports the aforementioned error.

It might be mentioned that the machine I've been using to try to access the page is on XYZ domain, as is the IIS server - however, the SQL server is in the ABC domain. Does this matter?

Thursday, March 22, 2012

ASP Pages on Windows Longhorn

Hello Guys,
I have .asp installed on longhorn server and everytime I goto look at the
page, I get a 500 internal server error..
Anyone got any suggestions!
Thanks
J Bowman
jbowman@.neo.rr.comYou might ask them here.
http://forums.microsoft.com/TechNet...D=161&SiteID=17
http://www.microsoft.com/communitie...oft.com/protect
"J Bowman [293288]" wrote:
| Hello Guys,
|
| I have .asp installed on longhorn server and everytime I goto look at the
| page, I get a 500 internal server error..
|
| Anyone got any suggestions!
|
| Thanks
| J Bowman
| jbowman@.neo.rr.com
|
||||Got it to work... thanks for your help
"Dave Patrick" <DSPatrick@.nospam.gmail.com> wrote in message
news:uxR7M5%23vGHA.5084@.TK2MSFTNGP04.phx.gbl...
> You might ask them here.
> http://forums.microsoft.com/TechNet...n&cr=US

> --
> Regards,
> Dave Patrick ...Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
> "J Bowman [293288]" wrote:
> | Hello Guys,
> |
> | I have .asp installed on longhorn server and everytime I goto look at
> the
> | page, I get a 500 internal server error..
> |
> | Anyone got any suggestions!
> |
> | Thanks
> | J Bowman
> | jbowman@.neo.rr.com
> |
> |
>

ASP Pages on Windows Longhorn

Hello Guys,
I have .asp installed on longhorn server and everytime I goto look at the
page, I get a 500 internal server error..
Anyone got any suggestions!
Thanks
J Bowman
jbowman@.neo.rr.comYou might ask them here.
http://forums.microsoft.com/TechNet/default.aspx?ForumGroupID=161&SiteID=17
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.inetserver.iis&cat=en_US_02ceb021-bb43-476d-8f8f-6c00a363ccf5&lang=en&cr=US
--
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"J Bowman [293288]" wrote:
| Hello Guys,
|
| I have .asp installed on longhorn server and everytime I goto look at the
| page, I get a 500 internal server error..
|
| Anyone got any suggestions!
|
| Thanks
| J Bowman
| jbowman@.neo.rr.com
|
||||Got it to work... thanks for your help
"Dave Patrick" <DSPatrick@.nospam.gmail.com> wrote in message
news:uxR7M5%23vGHA.5084@.TK2MSFTNGP04.phx.gbl...
> You might ask them here.
> http://forums.microsoft.com/TechNet/default.aspx?ForumGroupID=161&SiteID=17
> http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.inetserver.iis&cat=en_US_02ceb021-bb43-476d-8f8f-6c00a363ccf5&lang=en&cr=US
> --
> Regards,
> Dave Patrick ...Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
> "J Bowman [293288]" wrote:
> | Hello Guys,
> |
> | I have .asp installed on longhorn server and everytime I goto look at
> the
> | page, I get a 500 internal server error..
> |
> | Anyone got any suggestions!
> |
> | Thanks
> | J Bowman
> | jbowman@.neo.rr.com
> |
> |
>

ASP error with stored procedure

SQL Server 2000 on Windows 2003 SP1 and IIS6
I'm getting the following error from my ASP page:
Microsoft OLE DB Provider for SQL Server error '80040e14'
Formal parameter '@.mname' was defined as OUTPUT but the actual parameter
not declared OUTPUT.
However, the formal parameter '@.mname' was used in a previous stored
procedure accessed by the same command object and that parameter has been
been deleted prior to the call.
Here's the DDL for the procedure:
CREATE PROCEDURE InsertAndIdentifyNewStarter
@.peopleID INTEGER,
@.newstarterID BIGINT OUTPUT
AS
INSERT INTO newstarter (peopleID)
VALUES (@.peopleID)
SELECT @.newstarterID = SCOPE_IDENTITY()
GO
And the code snippet that's giving the problem:
Dim cmd, ln
Set cmd = Server.CreateObject("ADODB.Command")
With cmd
.ActiveConnection = "Provider=" & DBPROVIDER & ";" & CONNECTIONSTRING
.CommandType = adCmdStoredProc
.CommandText = "InsertAndIdentifyPerson"
.Parameters.Append .CreateParameter("@.fname", adVarChar, _
adParamInput, 100, firstname)
.Parameters.Append .CreateParameter("@.mname", adVarChar, _
adParamInput, 100, middlename)
.Parameters.Append .CreateParameter("@.sname", adVarChar, _
adParamInput, 100, lastname)
.Parameters.Append .CreateParameter("@.fullname", adVarChar, _
adParamInput, 200, firstname & " " & lastname)
.Parameters.Append .CreateParameter("@.datestarted", adDBDate, _
adParamInput, 10, DBStartDate)
.Parameters.Append .CreateParameter("@.enabled", adInteger, _
adParamInput, 10, 1)
.Parameters.Append .CreateParameter("@.existsinaccounts", _
adInteger, adParamInput, 10, 0)
.Parameters.Append .CreateParameter("@.loggedon", adInteger, _
adParamInput, 10, 0)
.Parameters.Append .CreateParameter("@.itstatus", adInteger, _
adParamInput, 10, 5) ' 5 = New Starter
.Parameters.Append .CreateParameter("@.pID", adInteger, _
adParamOutput, 10)
.Execute ln, , adExecuteNoRecords
pID = .Parameters("@.pID")
' Delete the parameters so that we can reuse the command object
While .Parameters.Count > 0
.Parameters.Delete 0
Wend
' Create a newstarter record for this person
.CommandText = "InsertAndIdentifyPerson"
.Parameters.Append .CreateParameter("@.peopleID", adBigInt, _
adParamInput, 10, pID)
.Parameters.Append .CreateParameter("@.newstarterID", _
adBigInt, adParamOutput, 10)
.Execute ln, , adExecuteNoRecords
' ** The preceding line produces the error **
newstarterID = .Parameters("@.newstarterID")
End With
Set cmd = Nothing
Any ideas what I'm doing wrong or what the problem is?
TIA,
Geoff> CREATE PROCEDURE InsertAndIdentifyNewStarterd">
> snip
> .CommandText = "InsertAndIdentifyPerson"
It looks to me like you are executing the wrong proc.
Hope this helps.
Dan Guzman
SQL Server MVP
"Geoff Lane" <geoff@.nospam.gjctech.co.uk> wrote in message
news:Xns97EA7C83661FBgjctcswxnsrt@.207.46.248.16...
> SQL Server 2000 on Windows 2003 SP1 and IIS6
> I'm getting the following error from my ASP page:
> Microsoft OLE DB Provider for SQL Server error '80040e14'
> Formal parameter '@.mname' was defined as OUTPUT but the actual parameter
> not declared OUTPUT.
> However, the formal parameter '@.mname' was used in a previous stored
> procedure accessed by the same command object and that parameter has been
> been deleted prior to the call.
> Here's the DDL for the procedure:
> CREATE PROCEDURE InsertAndIdentifyNewStarter
> @.peopleID INTEGER,
> @.newstarterID BIGINT OUTPUT
> AS
> INSERT INTO newstarter (peopleID)
> VALUES (@.peopleID)
> SELECT @.newstarterID = SCOPE_IDENTITY()
> GO
> And the code snippet that's giving the problem:
> Dim cmd, ln
> Set cmd = Server.CreateObject("ADODB.Command")
> With cmd
> .ActiveConnection = "Provider=" & DBPROVIDER & ";" & CONNECTIONSTRING
> .CommandType = adCmdStoredProc
> .CommandText = "InsertAndIdentifyPerson"
> .Parameters.Append .CreateParameter("@.fname", adVarChar, _
> adParamInput, 100, firstname)
> .Parameters.Append .CreateParameter("@.mname", adVarChar, _
> adParamInput, 100, middlename)
> .Parameters.Append .CreateParameter("@.sname", adVarChar, _
> adParamInput, 100, lastname)
> .Parameters.Append .CreateParameter("@.fullname", adVarChar, _
> adParamInput, 200, firstname & " " & lastname)
> .Parameters.Append .CreateParameter("@.datestarted", adDBDate, _
> adParamInput, 10, DBStartDate)
> .Parameters.Append .CreateParameter("@.enabled", adInteger, _
> adParamInput, 10, 1)
> .Parameters.Append .CreateParameter("@.existsinaccounts", _
> adInteger, adParamInput, 10, 0)
> .Parameters.Append .CreateParameter("@.loggedon", adInteger, _
> adParamInput, 10, 0)
> .Parameters.Append .CreateParameter("@.itstatus", adInteger, _
> adParamInput, 10, 5) ' 5 = New Starter
> .Parameters.Append .CreateParameter("@.pID", adInteger, _
> adParamOutput, 10)
> .Execute ln, , adExecuteNoRecords
> pID = .Parameters("@.pID")
> ' Delete the parameters so that we can reuse the command object
> While .Parameters.Count > 0
> .Parameters.Delete 0
> Wend
> ' Create a newstarter record for this person
> .CommandText = "InsertAndIdentifyPerson"
> .Parameters.Append .CreateParameter("@.peopleID", adBigInt, _
> adParamInput, 10, pID)
> .Parameters.Append .CreateParameter("@.newstarterID", _
> adBigInt, adParamOutput, 10)
> .Execute ln, , adExecuteNoRecords
> ' ** The preceding line produces the error **
> newstarterID = .Parameters("@.newstarterID")
> End With
> Set cmd = Nothing
> Any ideas what I'm doing wrong or what the problem is?
> TIA,
> --
> Geoff|||"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in
news:elcHsWflGHA.5044@.TK2MSFTNGP02.phx.gbl:

> It looks to me like you are executing the wrong proc.
D'Oh! That'll teach me to cut-and-paste code :(
Thanks - you are correct!
Geoff

ASP cannot run stored proc until the web user has run the proc in Query Analyzer

I have an ASP that has been working fine for several months, but it
suddenly broke. I wonder if windows update has installed some security
patch that is causing it.

The problem is that I am calling a stored procedure via an ASP
(classic, not .NET) , but nothing happens. The procedure doesn't work,
and I don't get any error messages.

I've tried dropping and re-creating the user and permissions, to no
avail. If it was a permissions problem, there would be an error
message. I trace the calls in Profiler, and it has no complaints. The
database is getting the stored proc call.

I finally got it to work again, but this is not a viable solution for
our production environment:

1. response.write the SQL call to the stored procedure from the ASP
and copy the text to the clipboard.
2. log in to QueryAnalyzer using the same user as used by the ASP.
3. paste and run the SQL call to the stored proc in query analyzer.

After I have done this, it not only works in Query Analyzer, but then
the ASP works too. It continues to work, even after I reboot the
machine. This is truly bizzare and has us stumped. My hunch is that
windows update installed something that has created this issue, but I
have not been able to track it down.central_scrutinizer,

Does the ASP page hang, timeout or just return with no results? If it hangs
or times out, this may be happening:

1. The command is executed from the ASP page.
2. SQL Server needs to allocate more disk space (data or log) and performs
an autogrow of a large amount of disk space. This could take an extended
period of time.
3. The user cancels the ASP page or the page times out.
4. SQL Server cancels the transaction and also cancels the need for
additional disk space.
5. If steps 1-4 are repeated, you get the same result.
6. A user runs the stored procedure in QA allowing it to finish.
7. SQL Server allocates the addional space.
8. The ASP page now runs fine because the space has been allocated (until
the next time the database needs to allocate more space).

-- Bill

1. We would run the stored
"central_scrutinizer" <cbellur@.hotmail.comwrote in message
news:1172185833.914945.318670@.m58g2000cwm.googlegr oups.com...

Quote:

Originally Posted by

>I have an ASP that has been working fine for several months, but it
suddenly broke. I wonder if windows update has installed some security
patch that is causing it.
>
The problem is that I am calling a stored procedure via an ASP
(classic, not .NET) , but nothing happens. The procedure doesn't work,
and I don't get any error messages.
>
I've tried dropping and re-creating the user and permissions, to no
avail. If it was a permissions problem, there would be an error
message. I trace the calls in Profiler, and it has no complaints. The
database is getting the stored proc call.
>
I finally got it to work again, but this is not a viable solution for
our production environment:
>
1. response.write the SQL call to the stored procedure from the ASP
and copy the text to the clipboard.
2. log in to QueryAnalyzer using the same user as used by the ASP.
3. paste and run the SQL call to the stored proc in query analyzer.
>
After I have done this, it not only works in Query Analyzer, but then
the ASP works too. It continues to work, even after I reboot the
machine. This is truly bizzare and has us stumped. My hunch is that
windows update installed something that has created this issue, but I
have not been able to track it down.
>

Tuesday, March 20, 2012

ASP .NET Application is Hanging when number of user grows

Hi,

Asp.net 2.0 (VB) application with Sql server 2000 Installed in windows 2000 professional server.Only less than 10 users using this application.

The problem is sometimes the application didn't response, it's very slow to get the information and after sometimes its never responding it showing hourclass.

I used Helper class (Application Block). Since Sql Server 2000 doesn't have the MARS Function, i have manually close the connection and opening again everytime.

Any idea?. Thanks in advance.

Help Class Modified Code:

--

Code :

' If the provided connection is not open, we will open it

If connection.State <> ConnectionState.Open Then

connection.Open()

mustCloseConnection = True

Else

mustCloseConnection = False

End If

Data ObjectBase :

'The transaction will call this method and also check the connection status

Public Sub BeginTransaction()

Try

If Not (myTransaction Is Nothing) Then

'Throw New Exception(ConfigManager.ReadFromXml("msg_DataAccess_Begin_trans"))

Throw New Exception("Transaction Error in Begin")

End If

If ourConnection.State <> ConnectionState.Open Then

ourConnection.Open()

myMustClose = True

Else

myMustClose = False

End If

myTransaction = ourConnection.BeginTransaction()

Catch ex As Exception

'Throw New BRSDatabaseException(ex.Message, ex)

Throw ex

End Try ''''

End Sub

Sounds like you need to determine what the bottleneck is. It could any number of things from the network, memory, hardware.

Are there other databases on this server in use?

How many records are being returned from sql server?

Are the tables that are being hit indexed?

I'd have the sql server dba monitor usage on the server in question.

|||I don't think it is SQL Server or Asp.net Win2k Pro concurrent users is five which means you need Small Business Server.|||

Hi Anthony Martin,

Yes, In this server there are about 3 applications running.

Very few records only returning (100 records)

We set only the primary key index.

is there any problem with connection closing in the object base class?

|||

I can't really speak on whether or not the .NET code is the issue. I have more experience with database tuning.

What do the query plans look like for the queries the application is using?

Are there large table index scans?

Try running sp_who2 or select * from sys.dm_db_exec_requests to monitor system usage/performance

|||

This is the output for sp_who2 in Sql Server 2000 Database.

1 BACKGROUND sa . . NULL LAZY WRITER 21688 0 06/14 17:57:59 1
2 sleeping sa . . NULL LOG WRITER 200766 0 06/14 17:57:59 2
3 BACKGROUND sa . . NULL LOCK MONITOR 1203 0 06/14 17:57:59 3
4 BACKGROUND sa . . master SIGNAL HANDLER 47 0 06/14 17:57:59 4
5 BACKGROUND sa . . master TASK MANAGER 0 849 06/14 17:57:59 5
6 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 6
7 sleeping sa . . NULL CHECKPOINT SLEEP 252156 17092 06/14 17:57:59 7
8 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 8
9 BACKGROUND sa . . master TASK MANAGER 0 1595 06/14 17:57:59 9
10 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 10
11 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 11
12 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 12
13 BACKGROUND sa . . master TASK MANAGER 0 388 06/14 17:57:59 13
14 BACKGROUND sa . . master TASK MANAGER 0 2129 06/14 17:57:59 14
15 BACKGROUND sa . . master TASK MANAGER 0 2176 06/14 17:57:59 15
17 BACKGROUND sa . . master TASK MANAGER 0 517 06/14 17:57:59 17
51 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 62 37 06/14 17:58:37 SQLAgent - Generic Refresher 51
52 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 1192429 29 09/13 12:57:53 SQLAgent - Alert Engine 52
53 sleeping WCAS PCOFFNONGGK8881 . WCASR2 AWAITING COMMAND 61 16 09/13 11:53:43 TESS 53
54 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 578 8 09/13 12:48:39 Temis-CS 54
55 sleeping SA PCOFFNHONGHSC81 . TEMISCS AWAITING COMMAND 218 3 09/13 12:07:14 Temis-CS 55
56 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 2080 228 09/13 12:49:45 Temis-CS 56
57 sleeping TESS W2K92 . TESS AWAITING COMMAND 29175 3 09/13 12:55:11 .Net SqlClient Data Provider 57
58 sleeping W2K92\w2k92_remote W2K92 . TESS AWAITING COMMAND 63 5 09/13 12:49:03 MS SQLEM 58
59 RUNNABLE W2K92\w2k92_remote W2K92 . TESS SELECT INTO 156 9 09/13 12:58:00 SQL Query Analyzer 59
60 sleeping TESS W2K92 . TESS AWAITING COMMAND 5549 0 09/13 12:58:02 .Net SqlClient Data Provider 60
61 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 9422 408 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 61
62 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 1781 113 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 62

ASP .NET Application is Hanging when number of user grows

Hi,

Asp.net 2.0 (VB) application with Sql server 2000 Installed in windows 2000 professional server.Only less than 10 users using this application.

The problem is sometimes the application didn't response, it's very slow to get the information and after sometimes its never responding it showing hourclass.

I used Helper class (Application Block). Since Sql Server 2000 doesn't have the MARS Function, i have manually close the connection and opening again everytime.

Any idea?. Thanks in advance.

Help Class Modified Code:

--

Code :

' If the provided connection is not open, we will open it

If connection.State <> ConnectionState.Open Then

connection.Open()

mustCloseConnection = True

Else

mustCloseConnection = False

End If

Data ObjectBase :

'The transaction will call this method and also check the connection status

Public Sub BeginTransaction()

Try

If Not (myTransaction Is Nothing) Then

'Throw New Exception(ConfigManager.ReadFromXml("msg_DataAccess_Begin_trans"))

Throw New Exception("Transaction Error in Begin")

End If

If ourConnection.State <> ConnectionState.Open Then

ourConnection.Open()

myMustClose = True

Else

myMustClose = False

End If

myTransaction = ourConnection.BeginTransaction()

Catch ex As Exception

'Throw New BRSDatabaseException(ex.Message, ex)

Throw ex

End Try ''''

End Sub

Sounds like you need to determine what the bottleneck is. It could any number of things from the network, memory, hardware.

Are there other databases on this server in use?

How many records are being returned from sql server?

Are the tables that are being hit indexed?

I'd have the sql server dba monitor usage on the server in question.

|||I don't think it is SQL Server or Asp.net Win2k Pro concurrent users is five which means you need Small Business Server.|||

Hi Anthony Martin,

Yes, In this server there are about 3 applications running.

Very few records only returning (100 records)

We set only the primary key index.

is there any problem with connection closing in the object base class?

|||

I can't really speak on whether or not the .NET code is the issue. I have more experience with database tuning.

What do the query plans look like for the queries the application is using?

Are there large table index scans?

Try running sp_who2 or select * from sys.dm_db_exec_requests to monitor system usage/performance

|||

This is the output for sp_who2 in Sql Server 2000 Database.

1 BACKGROUND sa . . NULL LAZY WRITER 21688 0 06/14 17:57:59 1
2 sleeping sa . . NULL LOG WRITER 200766 0 06/14 17:57:59 2
3 BACKGROUND sa . . NULL LOCK MONITOR 1203 0 06/14 17:57:59 3
4 BACKGROUND sa . . master SIGNAL HANDLER 47 0 06/14 17:57:59 4
5 BACKGROUND sa . . master TASK MANAGER 0 849 06/14 17:57:59 5
6 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 6
7 sleeping sa . . NULL CHECKPOINT SLEEP 252156 17092 06/14 17:57:59 7
8 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 8
9 BACKGROUND sa . . master TASK MANAGER 0 1595 06/14 17:57:59 9
10 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 10
11 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 11
12 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 12
13 BACKGROUND sa . . master TASK MANAGER 0 388 06/14 17:57:59 13
14 BACKGROUND sa . . master TASK MANAGER 0 2129 06/14 17:57:59 14
15 BACKGROUND sa . . master TASK MANAGER 0 2176 06/14 17:57:59 15
17 BACKGROUND sa . . master TASK MANAGER 0 517 06/14 17:57:59 17
51 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 62 37 06/14 17:58:37 SQLAgent - Generic Refresher 51
52 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 1192429 29 09/13 12:57:53 SQLAgent - Alert Engine 52
53 sleeping WCAS PCOFFNONGGK8881 . WCASR2 AWAITING COMMAND 61 16 09/13 11:53:43 TESS 53
54 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 578 8 09/13 12:48:39 Temis-CS 54
55 sleeping SA PCOFFNHONGHSC81 . TEMISCS AWAITING COMMAND 218 3 09/13 12:07:14 Temis-CS 55
56 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 2080 228 09/13 12:49:45 Temis-CS 56
57 sleeping TESS W2K92 . TESS AWAITING COMMAND 29175 3 09/13 12:55:11 .Net SqlClient Data Provider 57
58 sleeping W2K92\w2k92_remote W2K92 . TESS AWAITING COMMAND 63 5 09/13 12:49:03 MS SQLEM 58
59 RUNNABLE W2K92\w2k92_remote W2K92 . TESS SELECT INTO 156 9 09/13 12:58:00 SQL Query Analyzer 59
60 sleeping TESS W2K92 . TESS AWAITING COMMAND 5549 0 09/13 12:58:02 .Net SqlClient Data Provider 60
61 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 9422 408 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 61
62 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 1781 113 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 62

ASP .NET Application is Hanging when number of user grows

Hi,

Asp.net 2.0 (VB) application with Sql server 2000 Installed in windows 2000 professional server.Only less than 10 users using this application.

The problem is sometimes the application didn't response, it's very slow to get the information and after sometimes its never responding it showing hourclass.

I used Helper class (Application Block). Since Sql Server 2000 doesn't have the MARS Function, i have manually close the connection and opening again everytime.

Any idea?. Thanks in advance.

Help Class Modified Code:

--

Code :

' If the provided connection is not open, we will open it

If connection.State <> ConnectionState.Open Then

connection.Open()

mustCloseConnection = True

Else

mustCloseConnection = False

End If

Data ObjectBase :

'The transaction will call this method and also check the connection status

Public Sub BeginTransaction()

Try

If Not (myTransaction Is Nothing) Then

'Throw New Exception(ConfigManager.ReadFromXml("msg_DataAccess_Begin_trans"))

Throw New Exception("Transaction Error in Begin")

End If

If ourConnection.State <> ConnectionState.Open Then

ourConnection.Open()

myMustClose = True

Else

myMustClose = False

End If

myTransaction = ourConnection.BeginTransaction()

Catch ex As Exception

'Throw New BRSDatabaseException(ex.Message, ex)

Throw ex

End Try ''''

End Sub

Sounds like you need to determine what the bottleneck is. It could any number of things from the network, memory, hardware.

Are there other databases on this server in use?

How many records are being returned from sql server?

Are the tables that are being hit indexed?

I'd have the sql server dba monitor usage on the server in question.

|||I don't think it is SQL Server or Asp.net Win2k Pro concurrent users is five which means you need Small Business Server.|||

Hi Anthony Martin,

Yes, In this server there are about 3 applications running.

Very few records only returning (100 records)

We set only the primary key index.

is there any problem with connection closing in the object base class?

|||

I can't really speak on whether or not the .NET code is the issue. I have more experience with database tuning.

What do the query plans look like for the queries the application is using?

Are there large table index scans?

Try running sp_who2 or select * from sys.dm_db_exec_requests to monitor system usage/performance

|||

This is the output for sp_who2 in Sql Server 2000 Database.

1 BACKGROUND sa . . NULL LAZY WRITER 21688 0 06/14 17:57:59 1
2 sleeping sa . . NULL LOG WRITER 200766 0 06/14 17:57:59 2
3 BACKGROUND sa . . NULL LOCK MONITOR 1203 0 06/14 17:57:59 3
4 BACKGROUND sa . . master SIGNAL HANDLER 47 0 06/14 17:57:59 4
5 BACKGROUND sa . . master TASK MANAGER 0 849 06/14 17:57:59 5
6 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 6
7 sleeping sa . . NULL CHECKPOINT SLEEP 252156 17092 06/14 17:57:59 7
8 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 8
9 BACKGROUND sa . . master TASK MANAGER 0 1595 06/14 17:57:59 9
10 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 10
11 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 11
12 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 12
13 BACKGROUND sa . . master TASK MANAGER 0 388 06/14 17:57:59 13
14 BACKGROUND sa . . master TASK MANAGER 0 2129 06/14 17:57:59 14
15 BACKGROUND sa . . master TASK MANAGER 0 2176 06/14 17:57:59 15
17 BACKGROUND sa . . master TASK MANAGER 0 517 06/14 17:57:59 17
51 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 62 37 06/14 17:58:37 SQLAgent - Generic Refresher 51
52 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 1192429 29 09/13 12:57:53 SQLAgent - Alert Engine 52
53 sleeping WCAS PCOFFNONGGK8881 . WCASR2 AWAITING COMMAND 61 16 09/13 11:53:43 TESS 53
54 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 578 8 09/13 12:48:39 Temis-CS 54
55 sleeping SA PCOFFNHONGHSC81 . TEMISCS AWAITING COMMAND 218 3 09/13 12:07:14 Temis-CS 55
56 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 2080 228 09/13 12:49:45 Temis-CS 56
57 sleeping TESS W2K92 . TESS AWAITING COMMAND 29175 3 09/13 12:55:11 .Net SqlClient Data Provider 57
58 sleeping W2K92\w2k92_remote W2K92 . TESS AWAITING COMMAND 63 5 09/13 12:49:03 MS SQLEM 58
59 RUNNABLE W2K92\w2k92_remote W2K92 . TESS SELECT INTO 156 9 09/13 12:58:00 SQL Query Analyzer 59
60 sleeping TESS W2K92 . TESS AWAITING COMMAND 5549 0 09/13 12:58:02 .Net SqlClient Data Provider 60
61 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 9422 408 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 61
62 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 1781 113 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 62

sql

ASP .NET Application is Hanging when number of user grows

Hi,

Asp.net 2.0 (VB) application with Sql server 2000 Installed in windows 2000 professional server.Only less than 10 users using this application.

The problem is sometimes the application didn't response, it's very slow to get the information and after sometimes its never responding it showing hourclass.

I used Helper class (Application Block). Since Sql Server 2000 doesn't have the MARS Function, i have manually close the connection and opening again everytime.

Any idea?. Thanks in advance.

Help Class Modified Code:

--

Code :

' If the provided connection is not open, we will open it

If connection.State <> ConnectionState.Open Then

connection.Open()

mustCloseConnection = True

Else

mustCloseConnection = False

End If

Data ObjectBase :

'The transaction will call this method and also check the connection status

Public Sub BeginTransaction()

Try

If Not (myTransaction Is Nothing) Then

'Throw New Exception(ConfigManager.ReadFromXml("msg_DataAccess_Begin_trans"))

Throw New Exception("Transaction Error in Begin")

End If

If ourConnection.State <> ConnectionState.Open Then

ourConnection.Open()

myMustClose = True

Else

myMustClose = False

End If

myTransaction = ourConnection.BeginTransaction()

Catch ex As Exception

'Throw New BRSDatabaseException(ex.Message, ex)

Throw ex

End Try ''''

End Sub

Sounds like you need to determine what the bottleneck is. It could any number of things from the network, memory, hardware.

Are there other databases on this server in use?

How many records are being returned from sql server?

Are the tables that are being hit indexed?

I'd have the sql server dba monitor usage on the server in question.

|||I don't think it is SQL Server or Asp.net Win2k Pro concurrent users is five which means you need Small Business Server.|||

Hi Anthony Martin,

Yes, In this server there are about 3 applications running.

Very few records only returning (100 records)

We set only the primary key index.

is there any problem with connection closing in the object base class?

|||

I can't really speak on whether or not the .NET code is the issue. I have more experience with database tuning.

What do the query plans look like for the queries the application is using?

Are there large table index scans?

Try running sp_who2 or select * from sys.dm_db_exec_requests to monitor system usage/performance

|||

This is the output for sp_who2 in Sql Server 2000 Database.

1 BACKGROUND sa . . NULL LAZY WRITER 21688 0 06/14 17:57:59 1
2 sleeping sa . . NULL LOG WRITER 200766 0 06/14 17:57:59 2
3 BACKGROUND sa . . NULL LOCK MONITOR 1203 0 06/14 17:57:59 3
4 BACKGROUND sa . . master SIGNAL HANDLER 47 0 06/14 17:57:59 4
5 BACKGROUND sa . . master TASK MANAGER 0 849 06/14 17:57:59 5
6 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 6
7 sleeping sa . . NULL CHECKPOINT SLEEP 252156 17092 06/14 17:57:59 7
8 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 8
9 BACKGROUND sa . . master TASK MANAGER 0 1595 06/14 17:57:59 9
10 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 10
11 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 11
12 BACKGROUND sa . . master TASK MANAGER 0 0 06/14 17:57:59 12
13 BACKGROUND sa . . master TASK MANAGER 0 388 06/14 17:57:59 13
14 BACKGROUND sa . . master TASK MANAGER 0 2129 06/14 17:57:59 14
15 BACKGROUND sa . . master TASK MANAGER 0 2176 06/14 17:57:59 15
17 BACKGROUND sa . . master TASK MANAGER 0 517 06/14 17:57:59 17
51 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 62 37 06/14 17:58:37 SQLAgent - Generic Refresher 51
52 sleeping NT AUTHORITY\SYSTEM W2K92 . msdb AWAITING COMMAND 1192429 29 09/13 12:57:53 SQLAgent - Alert Engine 52
53 sleeping WCAS PCOFFNONGGK8881 . WCASR2 AWAITING COMMAND 61 16 09/13 11:53:43 TESS 53
54 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 578 8 09/13 12:48:39 Temis-CS 54
55 sleeping SA PCOFFNHONGHSC81 . TEMISCS AWAITING COMMAND 218 3 09/13 12:07:14 Temis-CS 55
56 sleeping SA PCOFFNCHANWCS81 . TEMISCS AWAITING COMMAND 2080 228 09/13 12:49:45 Temis-CS 56
57 sleeping TESS W2K92 . TESS AWAITING COMMAND 29175 3 09/13 12:55:11 .Net SqlClient Data Provider 57
58 sleeping W2K92\w2k92_remote W2K92 . TESS AWAITING COMMAND 63 5 09/13 12:49:03 MS SQLEM 58
59 RUNNABLE W2K92\w2k92_remote W2K92 . TESS SELECT INTO 156 9 09/13 12:58:00 SQL Query Analyzer 59
60 sleeping TESS W2K92 . TESS AWAITING COMMAND 5549 0 09/13 12:58:02 .Net SqlClient Data Provider 60
61 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 9422 408 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 61
62 sleeping sa W2K92 . WCASR2 AWAITING COMMAND 1781 113 09/13 12:57:57 Microsoft(R) Windows (R) 2000 Operating System 62

ASP & SQL Server on separate machines causes performance degragation

I am currently running a windows 2000 machine with asp, sql server,
mail server, ftp server etc all on the same box.

The site runs several hundred ecommerce stores. Recently the
processor utilization has been spiking and I have decided to get
another server and use sql server on one and asp on the other.

So now I have a new windows 2003 server that I have setup all of the
asp code on. Problem is that when I run the asp code from the new
windows 2003 server it is extremely slow compared to the code running
on the old windows 2000 server which is where the sql server database
is also located.

From everything I have read the best way to optimize your site is to
use 2 separate servers one for iis/asp and one for sql server.

Am I doing something wrong here or is this normal??

Could this possibly be just because the old server is still serving
many requests and is pushing the requests from the new server to the
back of the line?

Does anyone have any ideas?

The syntax I am using to open the connection string is:

db_ConnectionString = "Driver=" & db_Driver & ";Server=" & db_Server &
";UID=" & db_UIN & ";PWD=" & db_pwd & ";Database=" & db_Database & ";"

conn_store.Open db_ConnectionString
where db_server is the ip address of the windows 2000 server

Is there a better way to do it across a network??

Any help or ideas would be much appreciated.Melanie:

>>From everything I have read the best way to optimize your site is to
use 2 separate servers one for iis/asp and one for sql server.

Adding a new layer to an environment will rarely gain you performance.
There is an extra network hop that the server has to make to retrieve
the data.
Having said that, you will most likely gain scalability which is
different from performance.

You might want to have some form of high speed or dedicated network
connection in between your web server and sql server. Although you
should first try to determine if the connection in between the servers
is really the problem here.

FYI, your server configuration is widely used. Unless you are
retrieving a very large amount of data, you shouldn't be able to tell
that BIG of a difference.

Hope that helps.

BZ

mblack@.deltad.com (Melanie Black) wrote in message news:<3efc718d.0310291500.661bbaba@.posting.google.com>...
> I am currently running a windows 2000 machine with asp, sql server,
> mail server, ftp server etc all on the same box.
> The site runs several hundred ecommerce stores. Recently the
> processor utilization has been spiking and I have decided to get
> another server and use sql server on one and asp on the other.
> So now I have a new windows 2003 server that I have setup all of the
> asp code on. Problem is that when I run the asp code from the new
> windows 2003 server it is extremely slow compared to the code running
> on the old windows 2000 server which is where the sql server database
> is also located.
> From everything I have read the best way to optimize your site is to
> use 2 separate servers one for iis/asp and one for sql server.
> Am I doing something wrong here or is this normal??
> Could this possibly be just because the old server is still serving
> many requests and is pushing the requests from the new server to the
> back of the line?
> Does anyone have any ideas?
> The syntax I am using to open the connection string is:
> db_ConnectionString = "Driver=" & db_Driver & ";Server=" & db_Server &
> ";UID=" & db_UIN & ";PWD=" & db_pwd & ";Database=" & db_Database & ";"
> conn_store.Open db_ConnectionString
> where db_server is the ip address of the windows 2000 server
> Is there a better way to do it across a network??
> Any help or ideas would be much appreciated.|||On 29 Oct 2003 15:00:06 -0800, Melanie Black wrote:

> I am currently running a windows 2000 machine with asp, sql server,
> mail server, ftp server etc all on the same box.
> The site runs several hundred ecommerce stores. Recently the
> processor utilization has been spiking and I have decided to get
> another server and use sql server on one and asp on the other.
> So now I have a new windows 2003 server that I have setup all of the
> asp code on. Problem is that when I run the asp code from the new
> windows 2003 server it is extremely slow compared to the code running
> on the old windows 2000 server which is where the sql server database
> is also located.

Not a solution but:
Wouldn't it have been easier to move just SQL Server to Windows 2003 and
keep the ASP sites on the Windows 2000 machine?

--
Karim
Recommended host: http://www.cheapesthosting.com - Affordable hosting since
1998|||Actually that was originally the idea but the windows 2003 server turned
out to be windows 2003 web edition which does not support sql server.

Also I was able to figure out that by changing the database connection
type the performance increased signifigantly. I can still notice a bit
of a slowdown but not nearly what I saw before.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!sql

Monday, March 19, 2012

Ask limitation about SQL server

Hi, Any one can tell me is it true that
The SQL Server in Windows Small Business Server 2003 Premium Edition have a limitation on building a database can not bigger than 10G. It is difficult to find such info. in MS web site
Please help, thanks a lot
TONo, SBS has the same size limitation as SQL Server 2000 (~1 million TB).
However, you are limited to two physical processors and 4 GB RAM.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"TO" <anonymous@.discussions.microsoft.com> wrote in message
news:E5355930-B0C9-434A-B77F-2CA80676D995@.microsoft.com...
> Hi, Any one can tell me is it true that:
> The SQL Server in Windows Small Business Server 2003 Premium Edition have
a limitation on building a database can not bigger than 10G. It is difficult
to find such info. in MS web site.
> Please help, thanks a lot.
> TO|||I only got as far as 475,000 TB and my machine choked.
LOL.
James Hokes
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
news:%230bO5oz$DHA.2348@.TK2MSFTNGP09.phx.gbl...
> No, SBS has the same size limitation as SQL Server 2000 (~1 million TB).
> However, you are limited to two physical processors and 4 GB RAM.
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
> "TO" <anonymous@.discussions.microsoft.com> wrote in message
> news:E5355930-B0C9-434A-B77F-2CA80676D995@.microsoft.com...
> > Hi, Any one can tell me is it true that:
> > The SQL Server in Windows Small Business Server 2003 Premium Edition
have
> a limitation on building a database can not bigger than 10G. It is
difficult
> to find such info. in MS web site.
> > Please help, thanks a lot.
> >
> > TO
>

Ask limitation about SQL server

Hi, Any one can tell me is it true that:
The SQL Server in Windows Small Business Server 2003 Premium Edition have a
limitation on building a database can not bigger than 10G. It is difficult t
o find such info. in MS web site.
Please help, thanks a lot.
TONo, SBS has the same size limitation as SQL Server 2000 (~1 million TB).
However, you are limited to two physical processors and 4 GB RAM.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"TO" <anonymous@.discussions.microsoft.com> wrote in message
news:E5355930-B0C9-434A-B77F-2CA80676D995@.microsoft.com...
> Hi, Any one can tell me is it true that:
> The SQL Server in Windows Small Business Server 2003 Premium Edition have
a limitation on building a database can not bigger than 10G. It is difficult
to find such info. in MS web site.
> Please help, thanks a lot.
> TO|||I only got as far as 475,000 TB and my machine choked.
LOL.
James Hokes
"Aaron Bertrand [MVP]" <aaron@.TRASHaspfaq.com> wrote in message
news:%230bO5oz$DHA.2348@.TK2MSFTNGP09.phx.gbl...
> No, SBS has the same size limitation as SQL Server 2000 (~1 million TB).
> However, you are limited to two physical processors and 4 GB RAM.
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.aspfaq.com/
>
>
> "TO" <anonymous@.discussions.microsoft.com> wrote in message
> news:E5355930-B0C9-434A-B77F-2CA80676D995@.microsoft.com...
have
> a limitation on building a database can not bigger than 10G. It is
difficult
> to find such info. in MS web site.
>

Thursday, March 8, 2012

AS2005 calculations bug?

This problem appears in BI-Developer Studio SP1 on a Windows 2003 Terminal server session. It appeared when I switched from the list view to the script/code view.

The calculations tab is empty with only this error message:

"Unexpected error occurred. Length cannot be less than zero. Parmeter name:length"

I am unable to see the calculations in the script view and in the list view. It is possible to see the calculations in the xml file if I choose code view.

Anyone who have seen this before?

Regards

Thomas Ivarsson

Problem solved. I had some rolling last 12 months calculations in a cube with only a few months of data that I tried to set to null and commented out all MDX-code. The purpose was to activate these calculations later. After removing null and activating the MDX-code everything works fine.

I think however that this is a minor bug.

Regards

Thomas Ivarsson

Saturday, February 25, 2012

AS 2000 with 64 bit OS

I moved one of my AS 2000 olap db new server -Windows 2003 "64-bit" OS with lot more processor then old server "32-bit" Windows OS.

Good news is my cube processing I save 50% time but my query performance is slow, I was thinking my query should fly.

I have AS 2000 "32-bit" in "64-bit" Windows server. I have same settings in AS 2000 as old server.

Thank you - Ashok

Well, first of all, if you running IA 64, you should install 64bit version of Analysis Services and run natively.

Second, running on higher end machine doesnt neccessarily means single query performance is going to improve drastically. With higher-end hardware, you should get higher throughput, ability to handle larger databases.
For single query you might be way better off creating additional aggregations supporting your query patterns. With processing times improving you should be able to afford having higher persentage of aggregations that should improve perofmance.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

article on Windows 2003 + sql

I came across an article long time ago and cannot seem to track it now.
It talked about the advantages of migrating your SQL 2000 from Windows 2000
to windows 2003.
Can someone who knows about this, send me a linkHi
I don't know of any SQL Server specific articles, but you will gain all the
generic advantages from using this version:
Top 10:
http://tinyurl.com/bqnx
Why upgrade:
http://tinyurl.com/2u2j9
Performance comparison:
http://tinyurl.com/x7ma
Upgrade site:
http://tinyurl.com/2yhgj
Analyst reports:
http://tinyurl.com/8fnxj
Background:
http://tinyurl.com/adhaf
John
"Hassan" wrote:
> I came across an article long time ago and cannot seem to track it now.
> It talked about the advantages of migrating your SQL 2000 from Windows 2000
> to windows 2003.
> Can someone who knows about this, send me a link
>
>

article on Windows 2003 + sql

I came across an article long time ago and cannot seem to track it now.
It talked about the advantages of migrating your SQL 2000 from Windows 2000
to windows 2003.
Can someone who knows about this, send me a link
Hi
I don't know of any SQL Server specific articles, but you will gain all the
generic advantages from using this version:
Top 10:
http://tinyurl.com/bqnx
Why upgrade:
http://tinyurl.com/2u2j9
Performance comparison:
http://tinyurl.com/x7ma
Upgrade site:
http://tinyurl.com/2yhgj
Analyst reports:
http://tinyurl.com/8fnxj
Background:
http://tinyurl.com/adhaf
John
"Hassan" wrote:

> I came across an article long time ago and cannot seem to track it now.
> It talked about the advantages of migrating your SQL 2000 from Windows 2000
> to windows 2003.
> Can someone who knows about this, send me a link
>
>

article on Windows 2003 + sql

I came across an article long time ago and cannot seem to track it now.
It talked about the advantages of migrating your SQL 2000 from Windows 2000
to windows 2003.
Can someone who knows about this, send me a linkHi
I don't know of any SQL Server specific articles, but you will gain all the
generic advantages from using this version:
Top 10:
http://tinyurl.com/bqnx
Why upgrade:
http://tinyurl.com/2u2j9
Performance comparison:
http://tinyurl.com/x7ma
Upgrade site:
http://tinyurl.com/2yhgj
Analyst reports:
http://tinyurl.com/8fnxj
Background:
http://tinyurl.com/adhaf
John
"Hassan" wrote:

> I came across an article long time ago and cannot seem to track it now.
> It talked about the advantages of migrating your SQL 2000 from Windows 200
0
> to windows 2003.
> Can someone who knows about this, send me a link
>
>

Monday, February 13, 2012

ArgumentNullException thrown after second connection

Hi,

Our application has two parts: one is Windows application and the other

one is Windows service. The service runs under Local system accont. We

use third party application to log into database which uses instance of

SQL Server 2005 Express . We use same methods for logging for Windows

application and for Windows service. Both, application and the service

are compiled with .Net framework 2.0 and VS 2005 (C#).

The application always logs into the database succesfuly. The problem

is with the service. The code for the service works like this: first

login into database to retrieve some data, after that log off and

disconnect, and after that immediately tries to login again using the

the same credentials. The first login is always succesful, but the

second one fails with error message:

Type:System.ArgumentNullException

Message:Value cannot be null.

Parameter name: Value is

null.

If we set the Service to run under User windows

account - everything works fine. Does anyone have similar

problems? What can be the problem here? Can anyone help me?

Thanks.

Could you provide the code that is causing the problem and identify the line that thows the exception?

Mike

|||The code is below. The same code works fine for the windows application

and when service connects for the first time. Database path, user name

and password are the same. The code crashes when Windows service tries

to connect for the second time (after LogOff) on line framework.LogOn( sDatabaseFullPath, sUserName, sUserPassword ) and it throws Exception:

Type:System.ArgumentNullException

Message:Value cannot be null.

Parameter name: Value is

null.

Parameters are not null, not even empty string. They contain valid string values (I checked with the debugger).

Framework is namespace from the third party application SDK. I

contacted this third party support also, but they didn't try to help me.

Please note that this code was working fine with .Net framework 1.1, VS 2003 and SQL Server 2000 DE.

public override void LogOn( DBCredentials dbCredentials

)

{

string sDatabaseFullPath =

dbCredentials.DBFileNameFullPath;

string sUserName =

dbCredentials.UserName;

string sUserPassword =

dbCredentials.Password;

try

{

if( IsConnectionLive

)

framework.LogOff();

framework.LogOn(sDatabaseFullPath, sUserName,

sUserPassword);

}

catch( InvalidLogonException

ile )

{

throw new InvalidLogonException(

ile.Message, dbCredentials);

}

catch( ThreadAbortException

ex )

{

throw

ex;

}

catch( LockDatabaseException lde )

{

throw new LockDatabaseException(

lde.Message );

}

catch( Exception

ex)

{

throw new Exception(

ex.Message );

}

}

|||

I don't know anything about this framework namespace or what happens when you call framework.LogOn so it's tough to give you any advice. If you can look at the code in framework, that would be a place to start, if you can't, you'll likely need to push back on the vendor that sold you this framework as this seems to be a problem with their code. There is likely something within framework that is causing the ArgumentNullException and it is just bubbling up.

As a troubleshooting measure, you could try creating your own LogOff and LogOn procedures and use them in your service. You need to try and isolate the "black box" and ensure that SQL Server is working correctly and that the action you are trying to perform is working without the call to framework.

Mike

|||Thanks.

Sunday, February 12, 2012

Are web services methods accessible with forms authentication?

Hi,
When I use the render method on a server using windows authentication the
method works like a charm.
When I use the render method on a server using forms authentication i get an
error: Object moved to <a
href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>
When using forms authentication are there special steps to accomplish in
order to get a web service method to work ? (like render)
thxYou could use a generic principal (System.Security.Principal) or the
System.Net.NetworkCredential and set the username and password to your
validated textbox values.
"Eric" <Eric@.discussions.microsoft.com> wrote in message
news:8D30F671-1600-45CC-9F62-05FB6E1AC6E6@.microsoft.com...
> Hi,
> When I use the render method on a server using windows authentication the
> method works like a charm.
> When I use the render method on a server using forms authentication i get
> an
> error: Object moved to <a
> href='/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx'>
> When using forms authentication are there special steps to accomplish in
> order to get a web service method to work ? (like render)
> thx|||No that didnt work either ... I tried almost every type of credentials
without success.
There must be an authentication step im missing...|||The Username/Password that connects to RS must be an authorized user on RS.
You could do this with a common Windows account (i.e. RSRenderer). This
way, your users access your site with forms auth (UserA, UserB, etc), but
they access the report server as RSRenderer.
If your users need to authenticate explicitly to RS (and you don't want to
use Windows accounts), you will probably have to go down the path
demonstrated in the following:
http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/ufairs.asp?frame=true#ufairs_topic3
"Eric" <Eric@.discussions.microsoft.com> wrote in message
news:74FE7DA9-63EC-42CF-BD3B-203F21ED8880@.microsoft.com...
> No that didnt work either ... I tried almost every type of credentials
> without success.
> There must be an authentication step im missing...
>