473,883 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.AccessVi olationExceptio n
Message: Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
StackTrace: at System.RuntimeT ypeHandle.Const ructName(Boolea n nameSpace,
Boolean fullInst, Boolean assembly)
at System.RuntimeT ype.RuntimeType Cache.Construct Name(String& name,
Boolean nameSpace, Boolean fullinst, Boolean assembly)
at System.RuntimeT ype.RuntimeType Cache.GetFullNa me()
at System.RuntimeT ype.get_FullNam e()
at System.Runtime. Serialization.S erializationInf o..ctor(Type type,
IFormatterConve rter converter)
at
System.Runtime. Serialization.F ormatters.Binar y.WriteObjectIn fo.InitSerializ e(Object
obj, ISurrogateSelec tor surrogateSelect or, StreamingContex t context,
SerObjectInfoIn it serObjectInfoIn it, IFormatterConve rter converter,
ObjectWriter objectWriter)
at
System.Runtime. Serialization.F ormatters.Binar y.WriteObjectIn fo.Serialize(Ob ject
obj, ISurrogateSelec tor surrogateSelect or, StreamingContex t context,
SerObjectInfoIn it serObjectInfoIn it, IFormatterConve rter converter,
ObjectWriter objectWriter)
at
System.Runtime. Serialization.F ormatters.Binar y.ObjectWriter. Serialize(Objec t
graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at
System.Runtime. Serialization.F ormatters.Binar y.BinaryFormatt er.Serialize(St ream
serializationSt ream, Object graph, Header[] headers, Boolean fCheck)
at
System.Runtime. Remoting.Channe ls.CrossAppDoma inSerializer.Se rializeObject(O bject
obj, MemoryStream stm)
at System.AppDomai n.Serialize(Obj ect o)
at System.AppDomai n.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 2273

"Tony Johansson" <t.*********@lo gica.comwrote in message
news:Oa******** ******@TK2MSFTN GP02.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.c omwrote in message
news:ua******** ******@TK2MSFTN GP05.phx.gbl...
>
"Tony Johansson" <t.*********@lo gica.comwrote in message
news:Oa******** ******@TK2MSFTN GP02.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.*********@lo gica.comwrote in message
news:Og******** ******@TK2MSFTN GP03.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.c omwrote in message
news:ua******** ******@TK2MSFTN GP05.phx.gbl...
>>
"Tony Johansson" <t.*********@lo gica.comwrote in message
news:Oa******* *******@TK2MSFT NGP02.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.c omwrote in message
news:uF******** ******@TK2MSFTN GP05.phx.gbl...
>
"Tony Johansson" <t.*********@lo gica.comwrote in message
news:Og******** ******@TK2MSFTN GP03.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.c omwrote in message
news:ua******* *******@TK2MSFT NGP05.phx.gbl.. .
>>>
"Tony Johansson" <t.*********@lo gica.comwrote in message
news:Oa****** ********@TK2MSF TNGP02.phx.gbl. ..

Another thing that is of interest is that if we run the built-in
applicatio n 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.*********@lo gica.comwrote in message
news:u8******** *****@TK2MSFTNG P06.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
1383
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 (beyond the obvious that it does not believe the class is a class, so to speak). (Btw, I did previously import BWindow).
1
2107
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 system was working great for 6 months or so. Then we changed our Netwok Locations of these Boxes and now both of them have different IP. DB IP: 1.2.3.4 App IP: 50.51.52.53
9
2397
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, and the other user will append nothing. Is there a way to avoid this from happening? For example. Lets say the user opens up a cached version of the page then append to the actual file. For some reason I remember reading about something like...
0
1506
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 put a custom XSD in the schemas\xml directory and it works pretty great. It's largely based on the asp.xsd. My problem is that while this works great for most controls, providing Intellisense whenever I have: <foo:FooTextBox runat=server......
42
2296
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 works). He even gives to examples. One is uC/OS-II operating system and the other is TCP/IP stack for said system. Do you know of other good examples of elegant and high-quality code
2
1791
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 redirected to:
6
2040
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 to try to make something all be meself. I have it working great to find the hypotenuse, but am having some dufficulty making it produce a missing leg. As you know, a^2 + b^2 = c^2 I have a variable that does the input for the one of the legs...
14
1727
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 commerical application for customers. The question was which microsoft licences are required on the customer site. The technology: ASP.NET, One central SQL-Server login, internal user database - no windows authentication.
5
2462
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 /* CSS for Marlon Sanders site */ html, body {
0
9940
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9792
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10847
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10415
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9573
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7971
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5797
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3232
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.