473,320 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

IIS (ASP.NET application) with SQL going crazy!

I have a really strange problem.

I have an ASP.NET 2 c# application which on load access 2 stored procedures.
All work OK (normally)

The application has an ajax timer which every now and then calls the server.

Then at one point in time I get an error. On refresh I see that the stored
procedure is being called but it returns nothing (If I call it via SQL
Manager Studio passing same parameters it works well).

I press refresh, the first stored procedure works but the second fails
(returning no data but no exeception)

I press refresh, the first fails,

etc, etc.
Then I resart IIS and all works well (.... till system hangs again)
What's happening? And how I can go around it???
Evan
Aug 25 '07 #1
6 1377
I would trace it with profiler to see exactly what is sent to SQL Server and
if there are any errors occurring that maybe the app isn't picking up.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Evan Camilleri" <ev**@holisticrd.com.nospamwrote in message
news:Ol**************@TK2MSFTNGP04.phx.gbl...
>I have a really strange problem.

I have an ASP.NET 2 c# application which on load access 2 stored
procedures. All work OK (normally)

The application has an ajax timer which every now and then calls the
server.

Then at one point in time I get an error. On refresh I see that the
stored procedure is being called but it returns nothing (If I call it via
SQL Manager Studio passing same parameters it works well).

I press refresh, the first stored procedure works but the second fails
(returning no data but no exeception)

I press refresh, the first fails,

etc, etc.
Then I resart IIS and all works well (.... till system hangs again)
What's happening? And how I can go around it???
Evan
Aug 25 '07 #2
It's really annoying! I am pasting a BAD trace and a GOOD trace. In the
BAD SQL is not receiving the currentUser for sure BUT the application is
'sending' them (when I debug). Maybe Windows integration security is the
problem?

this is a BAD trace:

declare @p2 int
set @p2=NULL
declare @p3 int
set @p3=NULL
declare @p4 int
set @p4=NULL
declare @p5 int
set @p5=NULL
declare @p6 numeric(38,10)
set @p6=NULL
declare @p7 bit
set @p7=0
exec spr_LineTick @currentLine=11,@producedPerHourThisShift=@p2
output,@producedThisShift=@p3 output,@rejectsPerHourThisShift=@p4
output,@rejectsThisShift=@p5 output,@totalDowntime=@p6 output,@newShift=@p7
output
select @p2, @p3, @p4, @p5, @p6, @p7

==

this is a GOOD trace:

declare @p1 int
set @p1=11
declare @p2 int
set @p2=388
declare @p4 datetime
set @p4=''2007-08-25 13:50:00:000''
declare @p5 datetime
set @p5=''2007-08-25 21:50:00:000''
declare @p6 nvarchar(25)
set @p6=N'BV-2007-5054'
declare @p7 nvarchar(50)
set @p7=N'SO-5860-01'
declare @p8 nvarchar(25)
set @p8=N'U1B Line 3'
declare @p9 int
set @p9=580
declare @p10 bit
set @p10=0
exec spr_GetShiftData @currentLine=@p1 output,@pshift=@p2
output,@currentUser=N'DOMAIN\user',@pshiftStart=@p 4 output,@pshiftEnd=@p5
output,@docRef=@p6 output,@itemCode=@p7 output,@lineFriendlyName=@p8
output,@targetPerHour=@p9 output,@onBreak=@p10 output
select @p1, @p2, @p4, @p5, @p6, @p7, @p8, @p9, @p10

==
Aug 25 '07 #3
If what you are saying is that the parameter @CurrentUser is not getting
passed in the bad trace I don't see how that can be related to SQL Servers
authentication. If if wasn't authenticating correctly you would not get be
able to execute the sp at all. I would look at the app that is making the
call and find out why it is omitting the parameter in the first place. That
may be something to do with security but not from a SQL Server standpoint as
you are way past that aspect of security when you exec the proc.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"Evan Camilleri" <ev**@holisticrd.com.nospamwrote in message
news:Or**************@TK2MSFTNGP04.phx.gbl...
It's really annoying! I am pasting a BAD trace and a GOOD trace. In the
BAD SQL is not receiving the currentUser for sure BUT the application is
'sending' them (when I debug). Maybe Windows integration security is the
problem?

this is a BAD trace:

declare @p2 int
set @p2=NULL
declare @p3 int
set @p3=NULL
declare @p4 int
set @p4=NULL
declare @p5 int
set @p5=NULL
declare @p6 numeric(38,10)
set @p6=NULL
declare @p7 bit
set @p7=0
exec spr_LineTick @currentLine=11,@producedPerHourThisShift=@p2
output,@producedThisShift=@p3 output,@rejectsPerHourThisShift=@p4
output,@rejectsThisShift=@p5 output,@totalDowntime=@p6
output,@newShift=@p7 output
select @p2, @p3, @p4, @p5, @p6, @p7

==

this is a GOOD trace:

declare @p1 int
set @p1=11
declare @p2 int
set @p2=388
declare @p4 datetime
set @p4=''2007-08-25 13:50:00:000''
declare @p5 datetime
set @p5=''2007-08-25 21:50:00:000''
declare @p6 nvarchar(25)
set @p6=N'BV-2007-5054'
declare @p7 nvarchar(50)
set @p7=N'SO-5860-01'
declare @p8 nvarchar(25)
set @p8=N'U1B Line 3'
declare @p9 int
set @p9=580
declare @p10 bit
set @p10=0
exec spr_GetShiftData @currentLine=@p1 output,@pshift=@p2
output,@currentUser=N'DOMAIN\user',@pshiftStart=@p 4 output,@pshiftEnd=@p5
output,@docRef=@p6 output,@itemCode=@p7 output,@lineFriendlyName=@p8
output,@targetPerHour=@p9 output,@onBreak=@p10 output
select @p1, @p2, @p4, @p5, @p6, @p7, @p8, @p9, @p10

==
Aug 25 '07 #4
I think the problem is with IIS

Evan
Aug 26 '07 #5

"Evan Camilleri" <ev**@holisticrd.com.nospamwrote in message
news:Or**************@TK2MSFTNGP04.phx.gbl...
It's really annoying! I am pasting a BAD trace and a GOOD trace. In the
BAD SQL is not receiving the currentUser for sure BUT the application is
'sending' them (when I debug). Maybe Windows integration security is the
problem?
<snipped>

I think you have a programming issue, where as, the parameters are being
lost by the application while in session. The fact that you have to press
the Refresh button should be an indication that the application has lost
session state and has aborted.

In my dealings with Ajax Pro .Net, making a call to a Ajax Web Method to
access a routine on the Code Behind File accessing a database, the code has
to be solid on its error trapping so that some kind of error is returned on
the callback, otherwise, you're missing the abort.

In addition to this, your application can be doing something so detrimental
to IIS that it's causing IIS to hang/abort as well.

Aug 26 '07 #6
I think i solved the issue.... quite stiupid error (but doing lots of
windows programming, not only ASP.NET...)

The SqlConnection was static (shared) and all kinds of strange errors
happen!

Evan
"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:uX**************@TK2MSFTNGP03.phx.gbl...
>
"Evan Camilleri" <ev**@holisticrd.com.nospamwrote in message
news:Or**************@TK2MSFTNGP04.phx.gbl...
>It's really annoying! I am pasting a BAD trace and a GOOD trace. In the
BAD SQL is not receiving the currentUser for sure BUT the application is
'sending' them (when I debug). Maybe Windows integration security is the
problem?

<snipped>

I think you have a programming issue, where as, the parameters are being
lost by the application while in session. The fact that you have to press
the Refresh button should be an indication that the application has lost
session state and has aborted.

In my dealings with Ajax Pro .Net, making a call to a Ajax Web Method to
access a routine on the Code Behind File accessing a database, the code
has to be solid on its error trapping so that some kind of error is
returned on the callback, otherwise, you're missing the abort.

In addition to this, your application can be doing something so
detrimental to IIS that it's causing IIS to hang/abort as well.

Aug 26 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: DotNetIsHorrible | last post by:
I write CRUD database applications for a living for an audience of about 100 users per application using classic ASP. I maintain and frequently change on user's request 22 different applications...
2
by: Vaap | last post by:
I did lot of googling to see if I can solve the SQL server not found problem while trying to run ASP.Net community starter kit from an XP machine to Windows 2003 server hosting SQL server 2000...
2
by: Chris Geier | last post by:
Sorry if this is in the wrong group or just a crazy question but..I guess I am going to ask it anyway. We have an ASP application connecting to backend SQL 2000 database. We are in the middle...
18
by: Juan Gil | last post by:
I have a problem with this. I installed it in my computer to modify it, but when I try to save the configuration file(xml file) the server returned an error that say that I dont have permissions to...
4
by: Steve | last post by:
Here is a post from somebody that has the same problem. Is this a known issue? Is there a fix for it? I would like to use VS.NET 2003 soon again. Any help is appreciated. Thank you, Steve ...
12
by: spinkysam | last post by:
Hi all, I just got a new laptop, Windows XP Pro SP2. I installed IIS 5.1 using add/remove Windows Components. I installed Visual Studio 6 SP6 and Visual Studio .Net (I need both of them)....
6
by: Guy Thornton | last post by:
I have an application in asp.net using vb. The asp.net portion of this application is mainly the user interface. The UI has references made to our business logic layer. And the business logic...
4
by: john_smith_nebraska | last post by:
I am using VISTA . I have IIS enabled . I installed VS 2005 successfully. Under old ASPX you knwo you go to inetpub wwwroot and run a test default.aspx file to see if it executes properly....
6
by: Evan Camilleri | last post by:
I have a really strange problem. I have an ASP.NET 2 c# application which on load access 2 stored procedures. All work OK (normally) The application has an ajax timer which every now and then...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.