473,405 Members | 2,261 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,405 software developers and data experts.

Having great problem with an C# application

Hello!

We have a C#.ASP.NET application that runs on a IIS 6. The application
contains actually several asp pages but there is no GUI.
The application receive an xml file that is processed.
There is also an MFC dll that is called from this asp application to make a
syntax check on quite many commands.
You don't have to know what a command is.

The problem that we get is the following when the asp pages calls the MFC
dll it will crash in such a way
that the whole application pool on the IIS will be restarted. The IIS runs
on a windows server 2003.
We have added some rows in the MFC dll to write to a file about where in the
dll it is executing.and also
write some value for different variables.
We know exactly on which row in the MFC dll it will crash . We know also
that this row is used in
several other places in the code so we doubt there is an error on that row
but we are not
100% sure.

We have also build the dll in debug mode and copied it to the windows server
2003 and it
will result in the same error crash in the dll.

Another thing that is of interest is that if we run the built-in application
server in Visual Studio which exist by default we never get any kind of
error.
This is strange because when we run the built-in application server the asp
will call the MFC dll but when we run it in this way we never ever get any
kind of problem.

We have also copied and change the asp pages to be runable in a windows form
application which will call the
MFC dll and here we never get any kind of problem either.

If we look in Event Viewer when we have a MFC crash we can read the
following.
Note that there is two entry for this DLL crash in the Event viewer. The
three rows at the bottom is the second entry and is written with a few
seconds delay compared to the first entry.

An unhandled exception occurred and the process was terminated.
Application ID: DefaultDomain
Process ID: 6108
Exception: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
StackTrace: at System.RuntimeTypeHandle.ConstructName(Boolean nameSpace,
Boolean fullInst, Boolean assembly)
at System.RuntimeType.RuntimeTypeCache.ConstructName( String& name,
Boolean nameSpace, Boolean fullinst, Boolean assembly)
at System.RuntimeType.RuntimeTypeCache.GetFullName()
at System.RuntimeType.get_FullName()
at System.Runtime.Serialization.SerializationInfo..ct or(Type type,
IFormatterConverter converter)
at
System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.InitSerialize(Object
obj, ISurrogateSelector surrogateSelector, StreamingContext context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter,
ObjectWriter objectWriter)
at
System.Runtime.Serialization.Formatters.Binary.Wri teObjectInfo.Serialize(Object
obj, ISurrogateSelector surrogateSelector, StreamingContext context,
SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter,
ObjectWriter objectWriter)
at
System.Runtime.Serialization.Formatters.Binary.Obj ectWriter.Serialize(Object
graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at
System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Serialize(Stream
serializationStream, Object graph, Header[] headers, Boolean fCheck)
at
System.Runtime.Remoting.Channels.CrossAppDomainSer ializer.SerializeObject(Object
obj, MemoryStream stm)
at System.AppDomain.Serialize(Object o)
at System.AppDomain.MarshalObject(Object o)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.3959, P3 45d6968e, P4 mscorlib,
P5 2.0.0.0, P6 4889dc80, P7 13ac, P8 35, P9 exception, P10 NIL.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
I hope to get some information about this strange problem that we have.
For example I wonder about the row that cause the crash.
As I said before it sounds strange that there should be an error on that row
when it works when we run and call the MFC dll in two different local modes
which are.
1. Use Visual Studio and the built-in application server
2. Use Windows forms that call the MFC dll

//Tony

Oct 29 '08 #1
6 2238

"Tony Johansson" <t.*********@logica.comwrote in message
news:Oa**************@TK2MSFTNGP02.phx.gbl...
Another thing that is of interest is that if we run the built-in
application server in Visual Studio which exist by default we never get
any kind of error.
This is strange because when we run the built-in application server the
asp will call the MFC dll but when we run it in this way we never ever get
any kind of problem.
The VS file based Web server on the development machine is not IIS. At the
very least, the Web server file based solution should have been converted to
run against IIS on the development machine.

To develop a solution to run against the VS file based Web server on the
development machine, solely if that is what has happened here, and never
running it against IIS on the development machine is a no no.

http://msdn.microsoft.com/en-us/libr...11(VS.80).aspx

Oct 29 '08 #2
Hello!

We don't have single clue what you are trying to say. Can you try to explain
in another way perhaps.
We just want to have as many suggestion as possible to how we can solve our
problem.

//Tony
"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:ua**************@TK2MSFTNGP05.phx.gbl...
>
"Tony Johansson" <t.*********@logica.comwrote in message
news:Oa**************@TK2MSFTNGP02.phx.gbl...
>Another thing that is of interest is that if we run the built-in
application server in Visual Studio which exist by default we never get
any kind of error.
This is strange because when we run the built-in application server the
asp will call the MFC dll but when we run it in this way we never ever
get any kind of problem.

The VS file based Web server on the development machine is not IIS. At the
very least, the Web server file based solution should have been converted
to run against IIS on the development machine.

To develop a solution to run against the VS file based Web server on the
development machine, solely if that is what has happened here, and never
running it against IIS on the development machine is a no no.

http://msdn.microsoft.com/en-us/libr...11(VS.80).aspx
Oct 29 '08 #3

"Tony Johansson" <t.*********@logica.comwrote in message
news:Og**************@TK2MSFTNGP03.phx.gbl...
Hello!

We don't have single clue what you are trying to say. Can you try to
explain in another way perhaps.
We just want to have as many suggestion as possible to how we can solve
our problem.
What I am telling you is that you running that application in the VS IDE
using VS's file based Web server/application server is NOT the same thing as
taking that project from the start, using an ASP.NET project type and
setting that project up to run directly against IIS on a development
machine.

Obviously, the two project types are not the same. On one hand, the solution
running against VS's Web file based server/application is not blowing-up. On
the other hand, the solution is blowing-up when running against IIS.

Therefore, one must test the application in VS debug mode with the
application being a true ASP.NET solution to find out what is the cause of
the application termination which causes IIS to abort too.

You will most like have to convert the VS Web file based/application server
project over to a ASP.NET project that is using IIS to test the project in
debug mode to uncover what is going wrong, use Google to find out how to
convert the file Web based project type over to an ASP.NET project type
using IIS.

The information in the link is telling you the possible conditions of the
application abort, and it is obvious that the VS Web based file
server/application server could be more forgiving than that solution being a
ASP.NET solution tested and debugged against IIS on the development machine.

http://msdn.microsoft.com/en-us/libr...11(VS.80).aspx
>

"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:ua**************@TK2MSFTNGP05.phx.gbl...
>>
"Tony Johansson" <t.*********@logica.comwrote in message
news:Oa**************@TK2MSFTNGP02.phx.gbl...
>>Another thing that is of interest is that if we run the built-in
application server in Visual Studio which exist by default we never get
any kind of error.
This is strange because when we run the built-in application server the
asp will call the MFC dll but when we run it in this way we never ever
get any kind of problem.

The VS file based Web server on the development machine is not IIS. At
the very least, the Web server file based solution should have been
converted to run against IIS on the development machine.

To develop a solution to run against the VS file based Web server on the
development machine, solely if that is what has happened here, and never
running it against IIS on the development machine is a no no.

http://msdn.microsoft.com/en-us/libr...11(VS.80).aspx
Oct 29 '08 #4
Tony Johansson explained on 29-10-2008 :
Hello!
I hope to get some information about this strange problem that we have.
For example I wonder about the row that cause the crash.
As I said before it sounds strange that there should be an error on that row
when it works when we run and call the MFC dll in two different local modes
which are.
1. Use Visual Studio and the built-in application server
2. Use Windows forms that call the MFC dll

//Tony
When you run your web-app this way, it runs under your own account,
which is probably a local administrator.

Under IIS it will run under a special account that has very limited
rights.

My guess is that that's the problem. And no, the solution will *not* be
to let the site run under an administrator account!

Hans Kesting
Oct 29 '08 #5
Hello!!

We have now a local IIS on our development computer.
We have not tested yet because we have to do some preparation before we can
test
if we get the same kind of problem when running a local IIS.

Most certain will we get the same kind of problem that we have on the
computer
where we run windows server 2003.

If we get the same kind of problem when running through the local IIS is it
in
any way possible to step in and debug the MFC dll that cause the problem ?

Our asp application project was created by using Open Website in VS.

//Tony

"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:uF**************@TK2MSFTNGP05.phx.gbl...
>
"Tony Johansson" <t.*********@logica.comwrote in message
news:Og**************@TK2MSFTNGP03.phx.gbl...
>Hello!

We don't have single clue what you are trying to say. Can you try to
explain in another way perhaps.
We just want to have as many suggestion as possible to how we can solve
our problem.

What I am telling you is that you running that application in the VS IDE
using VS's file based Web server/application server is NOT the same thing
as taking that project from the start, using an ASP.NET project type and
setting that project up to run directly against IIS on a development
machine.

Obviously, the two project types are not the same. On one hand, the
solution running against VS's Web file based server/application is not
blowing-up. On the other hand, the solution is blowing-up when running
against IIS.

Therefore, one must test the application in VS debug mode with the
application being a true ASP.NET solution to find out what is the cause of
the application termination which causes IIS to abort too.

You will most like have to convert the VS Web file based/application
server project over to a ASP.NET project that is using IIS to test the
project in debug mode to uncover what is going wrong, use Google to find
out how to convert the file Web based project type over to an ASP.NET
project type using IIS.

The information in the link is telling you the possible conditions of the
application abort, and it is obvious that the VS Web based file
server/application server could be more forgiving than that solution being
a ASP.NET solution tested and debugged against IIS on the development
machine.

http://msdn.microsoft.com/en-us/libr...11(VS.80).aspx
>>

"Mr. Arnold" <MR. Ar****@Arnold.comwrote in message
news:ua**************@TK2MSFTNGP05.phx.gbl...
>>>
"Tony Johansson" <t.*********@logica.comwrote in message
news:Oa**************@TK2MSFTNGP02.phx.gbl...

Another thing that is of interest is that if we run the built-in
application server in Visual Studio which exist by default we never get
any kind of error.
This is strange because when we run the built-in application server the
asp will call the MFC dll but when we run it in this way we never ever
get any kind of problem.

The VS file based Web server on the development machine is not IIS. At
the very least, the Web server file based solution should have been
converted to run against IIS on the development machine.

To develop a solution to run against the VS file based Web server on the
development machine, solely if that is what has happened here, and never
running it against IIS on the development machine is a no no.

http://msdn.microsoft.com/en-us/libr...11(VS.80).aspx
Oct 29 '08 #6

"Tony Johansson" <t.*********@logica.comwrote in message
news:u8*************@TK2MSFTNGP06.phx.gbl...
Hello!!

We have now a local IIS on our development computer.
We have not tested yet because we have to do some preparation before we
can test
if we get the same kind of problem when running a local IIS.

Most certain will we get the same kind of problem that we have on the
computer
where we run windows server 2003.

If we get the same kind of problem when running through the local IIS is
it in
any way possible to step in and debug the MFC dll that cause the problem ?

Our asp application project was created by using Open Website in VS.
If you have the source code for this MFC DLL you talk about, then you should
be able to set a project reference to the DLL's source code and debug it
within your ASP.NET project.

Oct 29 '08 #7

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

Similar topics

7
by: Zoo Keeper | last post by:
>>> class foo(BWindow.BWindow): ... pass ... Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: base is not a class object Not entirely sure what the message means...
1
by: Hari Om | last post by:
I am using Oracle 9.2.0.4 on IBM AIX 5.1 L System. Our DB Server had IP of "100.101.102.103" and our Tomcat Application Server (IP of 200.201.202.203) used to talk to above DB onn Port 1521. The...
9
by: Kelly Vernon | last post by:
I have a standard ASP page that appends to an xml page. Currently if there is more than one person attempting to append to the same XML file at a time. One user will have the ability to append,...
0
by: James Bright | last post by:
I have set up custom Intellisense for our project. (In a nutshell, we will have ASP.NET controls based on many of the statndard WebControls, but with a few extensions that we will be adding). I've...
42
by: gt8887b | last post by:
Hello! In his recent newsletter embedded expert Jack Ganssle says that programming students, as well as professional developers should readh "great code" (hight quality/well-crafted code that...
2
by: Max2006 | last post by:
Hi, I am using a asp.net hosting service and I don't have access to IIS MMC. I would like to implement a URL rewriting service so all urls with shape: http://domainname.com/nnnn.jpeg get...
6
by: 3than7 | last post by:
I am writing an application to solve Pythagorean Theorum Problems. This is on my own time, i am using a book to learn c++, and after doing a fahrenheit to celsuis program from that book, i wanted...
14
by: Alfred Sehmueller | last post by:
Hello, we were in contact with the microsoft licence hotline last week. We want to build a asp.net application based upon a windows 2003 server and Microsoft sql-server 2005. It will be a...
5
by: smittie31 | last post by:
I am having a problem with a border around me html page. The border does not flow thru the whole html page, it cuts off halfway. --> See http://keithborom.com/marlon-sanders CSS STYLESHEET ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.