Casini, IIS run code differently

C

Chip

I have a dual-threaded app that runs just as it's supposed to under Casini.
However, when I run the exact same code undier IIS (ASP.NET 2.0) on the same
machine, it is totally unpredictable and crashes the server. One would think
my threading was the problem, but like I said, runs perfectly under Casini.

Any ideas?
 
C

Chip

Debugging would seem to be a little useless since, as I said, it runs
perfectly under Casini. The problem is not with my code, but with the
difference between IIS and Casini. It appears there is a bug in IIS. I can't
be the first and only person to notice a difference between the two
environments.
 
W

Ward Bekker

Don't want to look like a smart-ass, but debugging on IIS is still
recommended as it will give you insight into what piece of your code
will be dealt with differently by IIS, so it might give you a hint for a
possible workaround.
Debugging would seem to be a little useless since, as I said, it runs
perfectly under Casini. The problem is not with my code, but with the
difference between IIS and Casini. It appears there is a bug in IIS. I can't
be the first and only person to notice a difference between the two
environments.


--
Ward Bekker
"Asp.Net Discussions for the Professional Developer"
http://www.dotnettaxi.com

"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
 
J

Juan T. Llibre

re:
Debugging would seem to be a little useless since, as I said, it runs perfectly under Casini. The
problem is not with my code, but with the difference between IIS and Casini.

Aargh!

The purpose, when you debug, is to identify problems.

If you debug the application under IIS,
you will identify what's causing the problems you say you have.

Isn't that what you want to do ? [ identify the problem(s)... ]

re:
I can't be the first and only person to notice a difference between the two environments.

No, but you may very well be the first one to refuse to debug an application
which apparently is having problems running uder IIS.

You can't pin down execution problems via osmosis.




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
G

Guest

As suggested, debug under IIS. Put the project into IIS and then open it from
VS 2005 - Open Website > From Local IIS > and then debug.
 
E

Erik Funkenbusch

Debugging would seem to be a little useless since, as I said, it runs
perfectly under Casini. The problem is not with my code, but with the
difference between IIS and Casini. It appears there is a bug in IIS. I can't
be the first and only person to notice a difference between the two
environments.

Ahh.. the classic denial.

I remember when people would come into the Visual C++ newsgroups after VC6
was released and complain that VC6 was broken because they recompiled their
apps with VC6 and their code broke. They swore up and down there was
nothing wrong with their code, because it worked fine on VC5.

After (finally) getting them to look a their code, 9 out of 10 times, they
would sheepishly admit they found the problem, and it was their code, it
just happened to work under VC5 and VC6 changed something that brought the
bug to light.

The purpose of that story was to point out to you that just because
something works in one environment, doesn't mean there's nothing wrong with
your code.
 
S

Stuart Irving

Attach to the w3wp.exe process and run the copy on IIS, you will be able to
step through in the same way.
 
B

Bruce Barker

Casini is not the same enviroment as iis, nor if you use iis on winxp is the
same enviroment if you deploy to win2003 server (iis 6.0). it would be nice
if there was little no difference between enviroments, but its not likely to
become perfect.

you code is crashing, it probably your bug (you are counting too much on
enviroment setup). you need to test in all enviroments.

-- bruce (sqlwork.com)
 
J

Juan T. Llibre

re:
Cassini is not the same enviroment as iis
your code is crashing, it's probably your bug (you are counting too much on enviroment setup). you
need to test in all enviroments.

He doesn't want to "test in all environments", Bruce.

I was the first to tell him that he needs to do that.

You're now the 4th poster who tells him that
he needs to debug under IIS ( the correct answer ).

His reply to me was that I need to "really need to get down from that ivory tower".
There's no worse blind man than one who doesn't want to see.

<shrug>



Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
C

Chip

I am finding that out from other helpful people. "Testing in all
environments" is a good idea if you are actually running in all those
environments. However, since Casini is only used during development (as far
as I know) and doesn't appear to mimick IIS 2.0 in a consistent way, it
seems that it is not in our best interests to develop using Casini.
 
G

Guest

Cassini was built with the objective of allowing developers to create web
projects on the file system with ease.

So it is easy for a bunch of developers to write one page each and work with
Cassini.

But eventually if you are deploying in IIS, you have to test there.

Regards
Pandurang
 
C

Christopher Reed

To add what others have mentioned here, debugging under IIS is important
because the web server environments (IIS and Cassini) are completely
different. Even if your web application runs fine under Cassini, there is
not as many sources of error associated with Cassini as there can be with
IIS. You mentioned that this is a dual-threaded app and that it works under
Cassini and not IIS. This is probably the source of your problem since IIS
will most likely behave differently with a multi-threaded application.
Debugging under IIS is the only way to the answer.
 
J

John

I've had similar problems - I was not fully locking shared objects. Worked
fine in Cassini, the bug only emerged on IIS.

Maybe Cassini doesn't genuniely multi-thread, so doesn't properly test the
locking strategy? Certainly it's behaviour in some ways is different to
IIS - eg it enforces Forms Authentication identity on jpg's and gif's, which
IIS doesn't (those pages arn't served though .NET worker, so no .NET
security checking takes place by default).

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top