473,382 Members | 1,165 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,382 software developers and data experts.

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...except "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.manifest 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 1807
Hi Russ,

"Russ" <ru*****@comcast.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.manifest 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***@community.nospam>
wrote:
>Hi Russ,

"Russ" <ru*****@comcast.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.manifest 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
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...
6
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...
0
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...
0
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...
2
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...
1
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...
3
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...
11
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...
0
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.