473,385 Members | 1,867 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,385 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 1232
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

1
by: Sjaak | last post by:
Hi All, I'm trying to get an ASP.NET Application to work with Active Directory but not having much luck. On the MS Website I found this example :...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.