473,695 Members | 2,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with release version of C++ Web Service

I have a Web Service that was originally created with .NET VC 2003,
and subsequently converted to the 2005 version. It works fine when
built as a debug version, and run on the workstation it was built on.
Now I want to build a release version so I can deploy it to Windows
2003 server. This project is compiled with "/clr:oldSystax". I've
run into several problems and I am not sure all of the things I am
discovering are related. Any help I can get to understand what is
going on would be much appreciated.

First I changed the project to release version, and changed all input
libraries to point to the release versions of the C++ DLL's that the
WS depends upon. The project builds and deploys to the local machine
with no problem. But when I try to run it I get the infamous debug
screen that tells you nothing...excep t "The specified module could not
be found".

Running Filemon, it becomes clear that the module in question is
MFC80.DLL. That is strange because this is the dev machine, and sure
enough the MFC80 libraries are installed in the Win SxS directories.
But checking the web service DLL with Depends, sure enough it can't
find MFC80! The reason it depends on MFC80 is that it is linked to
release C++ (unmanaged) DLL's that use MFC80.

So, I tried using the debug version of the web service with the
release C++ DLL's, and it works fine.

Then I checked the debug version with depends and it
shows the same thing - it depends on MFC80, and it also cannot be
found. So I checked the debug version with Filemon and surprise,
MFC80 is never looked for. Next I checked the release
intermediate.ma nifest file and the MFC80 libraries are not in it.

So... WHY do both versions depend upon MFC80 according to Depends, but
only the release version actually tries to open it?

And... If the release version does reqire MFC80, why is it not in the
manifest?

And... how can I fix the release version?

HELP Please!

Thanks, Russ
Oct 8 '07 #1
3 1843
Hi Russ,

"Russ" <ru*****@comcas t.netwrote in message
news:8d******** *************** *********@4ax.c om...
>I have a Web Service that was originally created with .NET VC 2003,
and subsequently converted to the 2005 version. It works fine when
built as a debug version, and run on the workstation it was built on.
Did you install vcredist on the target machine? Remember that two versions
exist: one for 2005 RTM and one for SP1. So the version you need depends on
your VS2005 you build your dlls with
Now I want to build a release version so I can deploy it to Windows
2003 server. This project is compiled with "/clr:oldSystax". I've
run into several problems
<snip/>
Running Filemon, it becomes clear that the module in question is
MFC80.DLL.
How does this become clear?
In which directories the mfc80.dll is searched and not found?
That is strange because this is the dev machine, and sure
enough the MFC80 libraries are installed in the Win SxS directories.
Could it be that another version of mfc80.dll is already loaded into the
process hosting the WebService? Is it hosted in IIS? So it would be
w3wp.exe. You might want to check that process with ProcessExplorer and see
which dlls are already loaded. I would expect that only one version of
mfc80.dll can be loaded at one time, so if the RTM version is already loaded
and your dll needs the SP1 version you could be in trouble.
But checking the web service DLL with Depends, sure enough it can't
find MFC80! The reason it depends on MFC80 is that it is linked to
release C++ (unmanaged) DLL's that use MFC80.
Which version of Depends do you use? I found that older versions do not know
how to deal with WinSXS. I use Depends 2.2 which seems to be OK.
So, I tried using the debug version of the web service with the
release C++ DLL's, and it works fine.
Hmm, strange.
Then I checked the debug version with depends and it
shows the same thing - it depends on MFC80, and it also cannot be
found. So I checked the debug version with Filemon and surprise,
MFC80 is never looked for. Next I checked the release
intermediate.ma nifest file and the MFC80 libraries are not in it.
What is your setting under Project->Properties->Config->General : "Use of
MFC"?
Remember that those settings are individually saved each Config, e.g.
Release and Debug. So make sure that all configs are in sync.

How are the config settings for Manifest Tool->Input and Output? Any
differences between Release and Debug config?
So... WHY do both versions depend upon MFC80 according to Depends, but
only the release version actually tries to open it?

And... If the release version does reqire MFC80, why is it not in the
manifest?
You might want to try to create a new WebService project created by the VC++
wizard of VS2005 and compare the settings with your upgraded project. Maybe
something was messed up when you upgraded from 2003 to 2005?

--
SvenC

Oct 8 '07 #2
SvenC, thanks for your comments. I have been working on this and
other problems for a week or so in my spare time. I finally got the
release web service working on my test W2003 server. There were
multiple issues making it hard to tell when an applied change made an
improvement. However the main thing with regards to release version
is that it is necessary for me to put MFC80.DLL somewhere in the
environment path. (For now, I placed it into the bin directory of the
web service, and then modified path statement on the server to include
the bin folder. After reboot the web service now runs.)

This still leaves some questions, as I somehow doubt this is the way
things are suppled to work. Here is one thing I noticed...

Using the latest version of Depends, when I examine the release
version of any of my C++ DLL's, it clearly shows that MFC80 is found
in the proper Side by Side folder. This is not surprising since MFC80
is in the manifest for those libraries. But as stated before, running
the web service, the SxS folders are not searched for MFC80 (because
MFC80 is not in the manifest for the web service). It now finds it in
the bin directory where I put it, and it seems happy to examine it and
then continue loading, where before it stopped loading because it was
not found.

Now, given that the web service links to several of the C++ DLL's that
link MFC80, why would not the web service automatically include MFC80
in it's manifest? Is this a bug in the way VC++ builds a C++ web
service? Could it be that this only happens if the web service is
complied with /clr:Oldsyntax? Can anyone answer these questions?

Thanks, Russ
On Mon, 8 Oct 2007 19:34:39 +0200, "SvenC" <Sv***@communit y.nospam>
wrote:
>Hi Russ,

"Russ" <ru*****@comcas t.netwrote in message
news:8d******* *************** **********@4ax. com...
>>I have a Web Service that was originally created with .NET VC 2003,
and subsequently converted to the 2005 version. It works fine when
built as a debug version, and run on the workstation it was built on.

Did you install vcredist on the target machine? Remember that two versions
exist: one for 2005 RTM and one for SP1. So the version you need depends on
your VS2005 you build your dlls with
>Now I want to build a release version so I can deploy it to Windows
2003 server. This project is compiled with "/clr:oldSystax". I've
run into several problems
<snip/>
>Running Filemon, it becomes clear that the module in question is
MFC80.DLL.

How does this become clear?
In which directories the mfc80.dll is searched and not found?
>That is strange because this is the dev machine, and sure
enough the MFC80 libraries are installed in the Win SxS directories.

Could it be that another version of mfc80.dll is already loaded into the
process hosting the WebService? Is it hosted in IIS? So it would be
w3wp.exe. You might want to check that process with ProcessExplorer and see
which dlls are already loaded. I would expect that only one version of
mfc80.dll can be loaded at one time, so if the RTM version is already loaded
and your dll needs the SP1 version you could be in trouble.
>But checking the web service DLL with Depends, sure enough it can't
find MFC80! The reason it depends on MFC80 is that it is linked to
release C++ (unmanaged) DLL's that use MFC80.

Which version of Depends do you use? I found that older versions do not know
how to deal with WinSXS. I use Depends 2.2 which seems to be OK.
>So, I tried using the debug version of the web service with the
release C++ DLL's, and it works fine.

Hmm, strange.
>Then I checked the debug version with depends and it
shows the same thing - it depends on MFC80, and it also cannot be
found. So I checked the debug version with Filemon and surprise,
MFC80 is never looked for. Next I checked the release
intermediate.m anifest file and the MFC80 libraries are not in it.

What is your setting under Project->Properties->Config->General : "Use of
MFC"?
Remember that those settings are individually saved each Config, e.g.
Release and Debug. So make sure that all configs are in sync.

How are the config settings for Manifest Tool->Input and Output? Any
differences between Release and Debug config?
>So... WHY do both versions depend upon MFC80 according to Depends, but
only the release version actually tries to open it?

And... If the release version does reqire MFC80, why is it not in the
manifest?

You might want to try to create a new WebService project created by the VC++
wizard of VS2005 and compare the settings with your upgraded project. Maybe
something was messed up when you upgraded from 2003 to 2005?
Oct 12 '07 #3
SvenC, thanks for your comments. I have been working on this and
other problems for a week or so in my spare time. I finally got the
release web service working on my test W2003 server. There were
multiple issues making it hard to tell when an applied change made an
improvement. However the main thing with regards to release version
is that it is necessary for me to put MFC80.DLL somewhere in the
environment path.
...
Now, given that the web service links to several of the C++ DLL's that
link MFC80, why would not the web service automatically include MFC80
in it's manifest? Is this a bug in the way VC++ builds a C++ web
service? Could it be that this only happens if the web service is
complied with /clr:Oldsyntax? Can anyone answer these questions?
I just made a test project ASP.Net Web Service with VS2005 SP1.
By default CLR was set to pure, so using MFC was not possible.
Changing it to oldSyntax gave me errors on the wizard created WebService
which is obvious as the wizard creates C++/CLI. As I do know MC++ enough I
didn't try to convert it to MC++ but instead used the /clr switch for the
new syntax. I added a CString in one place, built the project and have got a
manifest with an MFC reference.

So you might be correct with assuming a bug related to oldSyntax. You might
want to take this as a "good" reason for switching to C++/CLI. If you are
under time pressure you could use a #pragma to add the MFC dependency
manually:

http://msdn2.microsoft.com/en-us/lib...hy(VS.80).aspx

--
SvenC

Oct 15 '07 #4

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

Similar topics

0
3506
by: Michael Fork | last post by:
Note: I pasted the code the attachments as plain text after the message (I wasn't able to post it with an attachment...) Attached are the XSL and XML files that I am having problems with. I am trying to extract the stock information after having downloaded the HTML and converted to XML (well-formed HTML) using XSL and XPATH and am unable. I am basing what I have done so far off of...
6
1861
by: Plumer | last post by:
Good morning everyone, I am having difficulty distributing a Release version of an application. System info C# DOTNET, MDE 2002, Version 7.0.9466 .Net Framework, version 1.0.3705 My Desktop Operating system (as reported by Control Panel.System) is: Windows XP, Version 2002
0
1405
by: Randy Chow | last post by:
Hello everyone I was wondering if anyone has come across my problem? I programmed a Windows Service that uses httpWebRequest and httpWebResponse in VB.NET. Everything works fine until I use the webresponse object. What the Windows Service does is when the timer in the windows service elapses, the request to the website is made and a response is retrieve in a simple myhttpWebrequest.GetResponse(). I don't even do anything with the...
0
981
by: Ditlef | last post by:
We have a large C++ COM-based project we will migrate (slowly) to .NET. We have several basic libraries we need to wrap with C++ managed wrapper libraries. Having C++ runtime Debug/Release mixed with managed code seems to make problems for project setup. The document: Team Development with Visual Studio .NET and Visual SourceSafe http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/tdlg_ch5.asp contains...
2
5433
by: Praveen K | last post by:
I have a problem in communicating between the C# and the Excel Interop objects. The problem is something as described below. I use Microsoft Office-XP PIA dll’s as these dll’s were been recommended by many for web applications. I create the instances of Excel, Workbook and the worksheet. And later on Release the references by “System.Runtime.InteropServices.Marshal.ReleaseComObject(Object)” and making the object as null finally....
1
2217
by: Astera | last post by:
I seem to be having a problem using web parts after the beta 2 release. Any time I try to have the WebPartManager on any page, I get the exception listed below. I've gone through the steps listed below and have gone as far as given EVERYONE full control of the App_Data folder. I am using the default settings (which I assume is the Cassini web server), so I believe it is a user permissions problem. Furthermore, if I publish the site...
3
2191
by: | last post by:
Since I need to dotfuscate my exe file anyway, does it make any difference if I use Debug or Release versions. Would a Debug version be easier to decompile/study/reverse engineer than a Release version, both having been dotfuscated by the standard dotfuscator of visual studio 2003 ? Tia
11
2204
by: Steve Smith | last post by:
I have written a winforms application that launches approximately 150 threads with Thread.ThreadStart() Each thread uses CDO 1.21 to logon to a different Exchange mailbox and send/receive a number of mail messages, reporting back to the UI thread through the use of a Queue object. When all messages that are expected have been received, each thread sends a final update to the UI and the method should exit, which should terminate the...
0
1147
by: Russ | last post by:
I have a Web Service that was originally created with .NET VC 2003, and subsequently converted to the 2005 version. It works fine when built as a debug version, and run on the workstation it was built on. Now I want to build a release version so I can deploy it to Windows 2003 server. This project is compiled with "/clr:oldSystax". I've run into several problems and I am not sure all of the things I am discovering are related. Any help...
0
8631
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8984
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7661
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 projectplanning, coding, testing, and deploymentwithout 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
6491
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
5839
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4340
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...
0
4579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2272
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.