473,543 Members | 2,462 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Autodeployed Win App - Vista IIS 7.0

I have created a three tier application consisting of Client (Exe and
Exe.Config), Middle (WebServices) and Database tiers. The Client tier
contains an Exe, an Exe.Config and a dynamic Web reference. The Exe reads a
key-value pair from the Exe.Config file, which is a link to the appropriate
WebService that it should connect to, and sets the dynamic Web reference’s
URL. If the Exe.Config file does not contain the key-value or if the
Exe.Config is not found, the dynamic Web reference tries to establish a
connection to the default WebService, as specified on the development
machine. The WebService has a Web.Config file which contains a
ConnectionStrin g pointing to the Database.

I have auto-deployed this application (the Client and Middle tiers) on a
Windows 2000 server with IIS 5. From my Windows XP machine (with IIS 5) I can
run this application just fine using a URL such as:
http://myServer/myApps/myApp.Exe. Also, it connects to the WebServices I’ve
setup in the Exe.Config file.

I upgraded another Windows XP machine (with IIS 5) to Vista with IIS 7.0.
When I run the application on this machine, using the same URL as above, it
attempts to connect to the default WebService (my development WebService).
It’s behaving as if it can’t find or can’t read the Exe.Config on the server.
Do I have to make any changes in IIS 7.0 to allow the application to read and
download Exe.Config files that are not local? Any suggestions?

Thanks in advance.

Mar 21 '07 #1
18 2676
I should add that the three tier Windows application was developed using
Visual Studio 2003 on .NET Framework 1.1 SP 1.

"NormD" wrote:
I have created a three tier application consisting of Client (Exe and
Exe.Config), Middle (WebServices) and Database tiers. The Client tier
contains an Exe, an Exe.Config and a dynamic Web reference. The Exe reads a
key-value pair from the Exe.Config file, which is a link to the appropriate
WebService that it should connect to, and sets the dynamic Web reference’s
URL. If the Exe.Config file does not contain the key-value or if the
Exe.Config is not found, the dynamic Web reference tries to establish a
connection to the default WebService, as specified on the development
machine. The WebService has a Web.Config file which contains a
ConnectionStrin g pointing to the Database.

I have auto-deployed this application (the Client and Middle tiers) on a
Windows 2000 server with IIS 5. From my Windows XP machine (with IIS 5) I can
run this application just fine using a URL such as:
http://myServer/myApps/myApp.Exe. Also, it connects to the WebServices I’ve
setup in the Exe.Config file.

I upgraded another Windows XP machine (with IIS 5) to Vista with IIS 7.0.
When I run the application on this machine, using the same URL as above, it
attempts to connect to the default WebService (my development WebService).
It’s behaving as if it can’t find or can’t read the Exe.Config on the server.
Do I have to make any changes in IIS 7.0 to allow the application to read and
download Exe.Config files that are not local? Any suggestions?

Thanks in advance.
Mar 21 '07 #2
Hi NormD,

I performed serial tests based on your description and did see the problem
on my side.

When I place my test application(wit h a exe.config) on IIS 5, and then
launch the application with a URL, such as:

http://localhost/TestApp/TestApp.exe

the application could access the exe.config file on the web server.
However, when I place the application on IIS 6 or 7, and then lauch the
application with a URL, the application couldn't access the exe.config file
on the web server, so it uses the default value of the settings.

I use a tool called 'Fiddler' to watch the requests to & responses from the
IIS 7. I found that every time the application sumbits a request for the
exe.config to the IIS 7, the response from IIS 7 is always 403 'Forbidden'.
If I modify the URL to request the exe.config file directly, such as:

http://localhost/TestApp/TestApp.exe.config

The response is also 403 'Forbidden'.

It seems that IIS higher than 6.0 block the .config file by default,
because these files may contain sensitive information such as user names
and passwords.

I will go on the research about how to change this behavior on IIS 6 or 7,
and will get the result back to you ASAP.

I appreciate your patience!

Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 22 '07 #3
Linda,

I ran Fiddler on the Vista machine as well, while running the application
from the Web/app server and from localhost, and noticed some weirdness.
Fiddler didn't capture traffic for localhost (i.e.
http://localhost/MyDir/MyApps/MyApp.exe). However, it did capture traffic
when I ran the application from the server (i.e.
http://myServer/myApps/myApp.Exe).

I noticed that Fiddler did not capture the request for the myApp.Exe.Confi g
file on this machine, as it does on my XP machine. Furthermore, I checked the
IIS logs on the web/app server and noticed that the myApp.Exe.Confi g file was
requested, by application running on the Vista machine, and it probably was
returned (the logs contained a status code 200(=OK)). Contrary to what you
found, when I requested the myApp.Exe.Confi g file in internet explorer I did
receive the complete XML.

Also, to confirm what you found, running the application from localhost on
Vista did not use the Exe.Config file either.

Thanks.

"Linda Liu [MSFT]" wrote:
Hi NormD,

I performed serial tests based on your description and did see the problem
on my side.

When I place my test application(wit h a exe.config) on IIS 5, and then
launch the application with a URL, such as:

http://localhost/TestApp/TestApp.exe

the application could access the exe.config file on the web server.
However, when I place the application on IIS 6 or 7, and then lauch the
application with a URL, the application couldn't access the exe.config file
on the web server, so it uses the default value of the settings.

I use a tool called 'Fiddler' to watch the requests to & responses from the
IIS 7. I found that every time the application sumbits a request for the
exe.config to the IIS 7, the response from IIS 7 is always 403 'Forbidden'.
If I modify the URL to request the exe.config file directly, such as:

http://localhost/TestApp/TestApp.exe.config

The response is also 403 'Forbidden'.

It seems that IIS higher than 6.0 block the .config file by default,
because these files may contain sensitive information such as user names
and passwords.

I will go on the research about how to change this behavior on IIS 6 or 7,
and will get the result back to you ASAP.

I appreciate your patience!

Sincerely,
Linda Liu
Microsoft Online Community Support

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Mar 22 '07 #4
Hi NormD,

Thank you for your prompt response.

Sorry that I made a mistake in my first reply. The fact is that the Fiddler
couldn't capture traffic for localhost on my side too. Only when I use the
server name in the URL, it could capture traffic.

But it is true that I couldn't access the config file directly in IE.

As I mentioned in my first reply, IIS 6 or later block any request or
download of a .config file by default. If it wasn't the case, someone could
also download the web.config file of a server that may be containing some
sensitive information such as configuration keys in the app settings
sections or some database connections strings. So it is definitely a good
security protection that IIS blocks these file extensions from being
downloaded.

If you do want to do this globally(though I wouldn't recommend it) you can:

1)Make a bakup of your IIS Sesttings
%windir%\System 32\inetsrv\appc md add backup

2)Edit the applicationHost .config file
%windir%\System 32\inetsrv\conf ig\applicationH ost.config

applicationHost .config
<requestFilteri ng>
<fileExtensio ns allowUnlisted=" true">
*
<add fileExtension=" .config" allowed="false" />
*
</requestFilterin g>

Note that since Vista has more security protection policy, you need to run
Notepad as Administrator and then open the applicationHost .config file in
Notepad.

3) Switch to true: <add fileExtension=" .config" allowed="true" />

4) Save the file

And you should be ready to go.

For more information:
http://www.iis.net/default.aspx?tabi...abid=25&i=1040

Please try my suggestion and let me know the result.

If you have anything unclear, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support

Mar 23 '07 #5
Hi Linda,

My %windir%\System 32\inetsrv\conf ig\applicationH ost.config file did not
contain the default setting:

<add fileExtension=" .config" allowed="false" />

But, I went ahead and added the true/enable setting anyway:

<add fileExtension=" .config" allowed="true" />

However, I still couldn't run the application from the server or localhost.
I also tried restarting IIS, but to no avail.

One thing that was different was that Fiddler did capture the "exe.config "
file request, which was "returned" with a status of 200.

Thanks.

"Linda Liu [MSFT]" wrote:
Hi NormD,

Thank you for your prompt response.

Sorry that I made a mistake in my first reply. The fact is that the Fiddler
couldn't capture traffic for localhost on my side too. Only when I use the
server name in the URL, it could capture traffic.

But it is true that I couldn't access the config file directly in IE.

As I mentioned in my first reply, IIS 6 or later block any request or
download of a .config file by default. If it wasn't the case, someone could
also download the web.config file of a server that may be containing some
sensitive information such as configuration keys in the app settings
sections or some database connections strings. So it is definitely a good
security protection that IIS blocks these file extensions from being
downloaded.

If you do want to do this globally(though I wouldn't recommend it) you can:

1)Make a bakup of your IIS Sesttings
%windir%\System 32\inetsrv\appc md add backup

2)Edit the applicationHost .config file
%windir%\System 32\inetsrv\conf ig\applicationH ost.config

applicationHost .config
<requestFilteri ng>
<fileExtensio ns allowUnlisted=" true">
¡*
<add fileExtension=" .config" allowed="false" />
¡*
</requestFilterin g>

Note that since Vista has more security protection policy, you need to run
Notepad as Administrator and then open the applicationHost .config file in
Notepad.

3) Switch to true: <add fileExtension=" .config" allowed="true" />

4) Save the file

And you should be ready to go.

For more information:
http://www.iis.net/default.aspx?tabi...abid=25&i=1040

Please try my suggestion and let me know the result.

If you have anything unclear, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support

Mar 23 '07 #6
Hi NormD,

Thank you for your quickly feedback.
>However, I still couldn't run the application from the server or
localhost.

What do you mean in the above sentence? Do you mean you could NOT run the
application by launching it from IE using a URL, or the application can run
but couldn't access the exe.config file?

Just a confirmation that we're talking about the same scenario: what's the
versions of OS and IIS on the web server where you place your application
and exe.config file? In my test, I place the application and exe.config
file on Windows Vista with IIS 7. On the same machine, I launch the
application via a URL in IE.

If you run the application by double-clicking it, could it access the
exe.config file properly?

Sincerely,
Linda Liu
Microsoft Online Community Support

Mar 26 '07 #7
Hi Linda,

Sorry about all the confusion.

RE: "...I still couldn't run the application..." -- I meant that the
application ran but still did not read the exe.config file.

Scenario 1:
The application and exe.config file are deployed on a Windows 2000 server
with IIS 5. It is run/accessed from two other machines via a URL such as
http://myServer/myApps/myApp.Exe. The first machine has Windows XP (with IIS
5) and the application works; it reads the exe.config file. The second
machine was upgraded from Windows XP (with IIS 5); so now it has Vista (with
IIS 7.0). This is the machine I'm having problems with.

Scenario 2:
The same application and exe.config exist on localhost on our development
machines; these are the same two machines described above. It is run/accessed
via a URL such as http://localhost/MyDir/MyApps/MyApp.exe. On the XP (with
IIS 5) machine, the application works; it reads the exe.config file. On the
Vista (with IIS 7.0) machine the application runs but does not read the
exe.config file.

Scenario 3:
The same application and exe.config exist on localhost on our development
machines. It is run/accessed by double-clicking on the MyApp.exe file. Again,
on the XP (with IIS 5) machine, the application works; it reads the
exe.config file. However on the Vista (with IIS 7.0) machine the application
runs but DOES NOT read the exe.config file.

Thanks

"Linda Liu [MSFT]" wrote:
Hi NormD,

Thank you for your quickly feedback.
However, I still couldn't run the application from the server or
localhost.

What do you mean in the above sentence? Do you mean you could NOT run the
application by launching it from IE using a URL, or the application can run
but couldn't access the exe.config file?

Just a confirmation that we're talking about the same scenario: what's the
versions of OS and IIS on the web server where you place your application
and exe.config file? In my test, I place the application and exe.config
file on Windows Vista with IIS 7. On the same machine, I launch the
application via a URL in IE.

If you run the application by double-clicking it, could it access the
exe.config file properly?

Sincerely,
Linda Liu
Microsoft Online Community Support

Mar 27 '07 #8
Hi NormD,

Thank your for the detailed explanation.

It seems strange that when your application is run by double-clicked on
Vista, it couldn't read the exe.config file. I thought this may be related
to the security issue of Vista, because the application is copied from
somewhere else to the Vista machine.

I performed a test, i.e. develop an application on Windows 2003 and then
copy it and its exe.config file to another machine installed Vista. Then I
run the application on Vista by double-clicking it. However, the result
turns out that the application could read the exe.config file without any
problem.

You may have a try running the application on Vista as administrator to see
if it could read the exe.config file.

I think only if you application could read the exe.config file when it is
run by double-clicked, it is possible to make it read the exe.config file
when it is run via a URL.
Sincerely,
Linda Liu
Microsoft Online Community Support

Mar 29 '07 #9
Linda,

As per your suggestion, I ran the application as an Administrator by double
clicking on it and it used the exe.config as its supposed to. I also tried
running it in non-Administrator mode, and again it used the exe.config file.

"Linda Liu [MSFT]" wrote:
Hi NormD,

Thank your for the detailed explanation.

It seems strange that when your application is run by double-clicked on
Vista, it couldn't read the exe.config file. I thought this may be related
to the security issue of Vista, because the application is copied from
somewhere else to the Vista machine.

I performed a test, i.e. develop an application on Windows 2003 and then
copy it and its exe.config file to another machine installed Vista. Then I
run the application on Vista by double-clicking it. However, the result
turns out that the application could read the exe.config file without any
problem.

You may have a try running the application on Vista as administrator to see
if it could read the exe.config file.

I think only if you application could read the exe.config file when it is
run by double-clicked, it is possible to make it read the exe.config file
when it is run via a URL.
Sincerely,
Linda Liu
Microsoft Online Community Support

Mar 30 '07 #10

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

Similar topics

9
2676
by: salad | last post by:
Due to an earlier posting I read in this newsgroup regarding Office 2007 beta, I downloaded it. After I DL'd it, I got an invitation from MS to get WinVista. I am now wondering if, since both are betas, it is best to buy a new computer? My current computer setup is a Pentium 4, 1 gig memory, 2.66 ghz, 60-80 gig disk drive. MS's...
13
3009
by: Mark Rae | last post by:
Hi, On Friday I attended the Microsoft EVO conference in London where they talked about Vista, Office 2007 and Exchange 2007 and how they all work together beautifully, how they were all "people-ready" etc... I asked a couple of questions about Visual Studio.NET on Vista, especially on 64-bit Vista, and they became *very* nervous... To...
56
3588
by: Squishy | last post by:
I tried installing my VS2005 Pro on Vista Ultimate 32 bit RTM today and got errors stating that VS2005 was not compatible with Vista. Microsoft......please pull your finger out of my ass and tell me this is a joke. It must be a joke....because I also have read that VS2002 and VS2003 will not be supported on Vista. This clearly violates...
6
4263
by: j2ee.singh | last post by:
Hi, I'm looking to buy a new laptop primarily to learn & practice .NET and C#. My Question is: Is there any requirement for .NET and C# in terms of the following Operating Systems: - Windows Vista Home Basic - Windows Vista Business
19
2234
by: =?Utf-8?B?TWlrZTk5MDA=?= | last post by:
When there is a shortcut of our app on the desctop, the app is not run until all the security in control panel of win vista is cleared. What to do to not have this problem. We do not want to tell the customers to do this. -- Mike
2
1708
by: 13Rockes | last post by:
I am in the process of writing programs using VB6 in XP Pro. However, I am thinking about starting over using VB2005 as my company is migrating to Vista. Two questions... What kinds of problems will I have installing and running my VB6 app under Vista? If I develop VB2005 apps under XP, what kinds of problems will I have
2
1977
by: David | last post by:
I purchased a Dell for development and selected Vista Business as the OS. I am mostly working on ASP.net, Visual Studio 2005/2008, and SQL 2005. I am considering a switch back to XP pro (Dell will swap the OS) due to software compatibility and file permission issues with Vista. My Observations: * Reason to choose XP
11
1905
by: idoublepress | last post by:
Hi all, I've been struggling with an issue that I hope you can comment on or provide suggestions to. Our .NET 2.0 (VS2005) based product is crashing (when the user selects a particular feature on the UI) on Vista. It works fine on XP. In a nutshell: - user makes a selection on the UI - System.Reflection.MethodInfo.Invoke() calls into...
0
7341
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...
0
7584
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. ...
0
7729
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...
1
7332
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...
0
7677
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...
1
5258
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...
0
3385
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...
0
3386
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
626
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...

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.