Quantcast
Channel: Configuration & Scripting
Viewing all 780 articles
Browse latest View live

Adding Local Groups to IIS 8.5 Manager Permissions with PowerShell

$
0
0

Hi all,

I've been trying to automate the installation of IIS for some of our new 2012 R2 Web Servers at work and one of the things that I'd like to do is add the local Power Users group to IIS Managers Permissions through a PowerShell script.  

I'm relatively new to scripting, but I've toyed around with the instructions in this post, however, I can only seem to add users; not groups. So when I use something like: 

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Management")  
[Microsoft.Web.Management.Server.ManagementAuthorization]::Grant(".\Power Users", "Default Web Site", $FALSE)

I get a User with the name ".\Power Users" instead of the actual group.

Any thoughts?


Signagelink Enterprise Kiosk set-up

$
0
0

I am trying to set up my Signagelink Enterprise information kiosk and can not find the mcode.txt file in my Webedit folder. I have set up the Digital Signage Server, successfully logged in but can not go forward from this point.  Is there a step I am missing?

Export IIS Configuration from IIS6 (2003 Server) to IIS8.5 (2012 Server)

$
0
0

I don't need to move files, just the configuration - moving files is actually not a possibility for what we're doing.  Is there a way to accomplish this?

Thanks in Advance

Custom error 500

$
0
0

Hi,

I am currently busy with making some nice custom error pages for our clients.

In web.config I have the following:

<customErrors mode="On" redirectMode="ResponseRedirect" defaultRedirect="~/ErrPages/PageError.aspx">     <error statusCode="401" redirect="401.htm" /><error statusCode="403" redirect="403.htm" /><error statusCode="404" redirect="404.htm" /><error statusCode="500" redirect="500.htm" /></customErrors>

In IIS 8 I have set the errorpages on sitelevel:

Statuscode : 404

Path: C:\inetpub\custerr\404.htm

Type: File

Entry Type: Local

Statuscode: 500

Path: C:\inetpub\custerr\500.htm

Type: File

Entry Type: Local

The 404-error works perfectly giving the user a nice errorpage. The 500-error does not work. I configured it the same as the 404, put the file at the same place. When there is an error in my application, the server searches for the 500.htm but for some reason he doesn't find it and displays a 404-error. What have I done wrong? I tried with httperrors also, but this leads to nowhere.

Kinds regards,

Karen

Custom Config Section Error in IIS 8

$
0
0

Currently I've problem using custom config section, I've tested this config section with unit testing and it works perfectly, but when I used it in a WCF Service hosted in IIS 8 it produced an error:

Config Error:
Only one <configSections> element allowed. It must be the first child element of the root <configuration> elementMore Information:
This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

If you see the text "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined", this error is because you are running a .NET Framework 3.5-based application in .NET Framework 4. If you are running WebMatrix, to resolve this problem, go to the Settings node to set the .NET Framework version to ".NET 2". You can also remove the extra sections from the web.config file. 
View more information »

How to solve this issue? Thanks in advance.

How to limit downloads connection on iis ?

$
0
0

Hi Guys , I have a download website on the iis with win 2008 server and my download speed is not good enough , ia have daily 10.000 ips on my website , i wanna limit the downloads on my website for example

I wanna limit downloads for everybody

it means that i can download 2file together , for example

download/file1.test

download/file2.test

if i download file3.test it should give me an error ....

how can i do this  ? maximum connections ? i dont know any ideas ?

redirect from https to http

$
0
0

Hello,

I'm having issues figuring out a redirect from https to http.

I have a server with a single IP address. I have several websites on this server. One of the sites is accessed through port 443 whereas the others are not and do not require SSL. The problem is if I add HTTPS to one of the sites that do NOT require SSL it will bring me to the site accessed on port 443. Is there a way to prevent this from happening?

Any suggestions and advice would be great.

Thanks.

IIS 7 Bindings (including host header), host header not sticking permanently

$
0
0

Can someone help me with the following question please.

I am using the following script

' Connect to the WMI WebAdministration namespace.

Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")

' Create the secure binding.

oWebAdmin.Get("SSLBinding").Create "*", 443, "fbbca460988a482227ec71122177045e47f9f2ff", "MyStoreName"

' Create a new binding element.

Set oBinding = oWebAdmin.Get("BindingElement").SpawnInstance_

oBinding.BindingInformation = "*:443:"

oBinding.Protocol = "https"

' Get the default Web site.

Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")

' Increase the size of the array in the site's Bindings property.

arrBindings = oSite.Bindings

ReDim Preserve arrBindings(UBound(arrBindings) + 1)

' Add the new binding to the array.

Set arrBindings(UBound(arrBindings)) = oBinding

' Assign the array to the Site.Bindings property.

oSite.Bindings = arrBindings

Set oPath = oSite.Put_

Which I found at the following location

http://msdn.microsoft.com/en-us/library/ms691440(v=vs.90).aspx

The reason I chose this approach as opposed to using the PowerShell  New-WebBinding cmdlet is I want to associate with a particular Certificate and I do not see the option in this cmdlet to specify a certificate hash for the binding (is there an option here I am missing?)

The problem I have is the following

I am adding a ‘Host Header’ (Host Name column as it appear in the IIS 7 Admin GUI under bindings)

e.g. on the above line rather than just

oBinding.BindingInformation = "*:443:"

I am using for example.

oBinding.BindingInformation = "*:443:MyHostHeader"

The works ( or appears to work at first glance) is as much as if you go into the GUI would will see the new binding appear along with the relevant port number, IP address, Host Name (Host Header), great.

Now the problem, the Host header (Host Name column) disappears e.g. blanks out. This tends to happen (although not tried every scenario) when you go into edit, view the certificate which is bound to the site, which is all correct. I do not make any changed when I choose edit, I am just viewing the information re the certificate. Sometimes you need to come of the IIS Admin UI and go back in other times you will see the column blank off when clicking back to main tab after coming out of edit section.

I am wondering if this may be happening because the IP Address/Port combination (e.g. 10.10.10.10 443) is already unique and therefore no need for a host header to distinguish it from another site bound to the same port/IP address, so the system itself just gets rid of it?

Or is this example missing a SetInfo() or CommitChanges() ?

I was also trying to figure out how to do the same thing via the ADSI IIS interface e.g. PowerShell [ADSI]”IIS://MyServer/MySite” either look up the binding info and create/update the binding info

Any help most welcome

Thanks

Ernie


IIS 8 Shared configuration permissions issue

$
0
0

Hi guys,

I am building test environment with redundent NLB IIS servers with shared configuration. All the servers are running Windows Server Core 2012 64bit

All servers are joined to the NT domain TESTDOM.LOCAL domain, on the domain controller I have created a network share \\DC\configs that contain the files administration.config and applicationHost.config.   For the Redirection configs on all servers i am using the TESTDOM\Administrator user to connect to the share.  I have confirmed that users TESTDOM\Administrator and TESTDOM\IIS_IUSRS have got read / writer permissions.

I restart my IIS servers using remote IIS management console... they restart no problems but when i try click on the App pools and sites I get a error message: 

Filename:MACHINE/WEBROOT/APPHOST
Error: Cannot read configuration file due to insufficient permissions

My redirection.config files on all servers look like this:

<configuration>
<configSections>
<section name="configurationRedirection" />
</configSections>
<configurationRedirection enabled="true" path="\\DC\configs\" userName="TESTDOM\Administrator" password="P@55W0rd" />
</configuration>

Can anybody help me with this?  What am I missing here?

Web.Config interfering with Java Applet in Jar

$
0
0

I have a java applet that I am using in an ASP.NET application.  I can launch the .html file that contains the applet/jar with no issue from other IIS virtual directories and it runs as expected.  However, when I try to run it from this particular ASP.NET application directory, I am getting a Java ClassNotFound runtime error.  From experimenting, I have determined the issue is related the web.config for the application.  If I remove the web.config entirely or the system.webserver/system.web sections from it, the applet loads as expected from the .html file.  Can anyone shed light on what setting needs to be configured to allow the applet to load from the jar?  Below is my current configuration for the sections.

<div style="font-family: 'Courier New'; font-size: 10.0pt; color: #000000; background-color: #fff9ea; font-style: normal; font-weight: normal; text-decoration: none;">
<system.web><customErrorsmode="On"defaultRedirect="~/ServiceUnavailable.aspx"><errorstatusCode="404"redirect="~/PageUnavailable.aspx"/></customErrors><compilationdebug="false"targetFramework="4.0"><assemblies><addassembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><addassembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><addassembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><addassembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addassembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><addassembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><addassembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><addassembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies><buildProviders><addextension=".rdlc"type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/></buildProviders></compilation><traceenabled="false"requestLimit="40"pageOutput="false"writeToDiagnosticsTrace="true"/><pagestheme="default"controlRenderingCompatibilityVersion="3.5"clientIDMode="AutoID"><controls><addtagPrefix="telerik"namespace="Telerik.Web.UI"assembly="Telerik.Web.UI"/></controls></pages><httpRuntimemaxRequestLength="2097151"executionTimeout="7200"/><httpHandlers><addpath="CrystalImageHandler.aspx"verb="GET"type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/><addpath="Telerik.Web.UI.WebResource.axd"type="Telerik.Web.UI.WebResource"verb="*"validate="false"/><addpath="Reserved.ReportViewerWebControl.axd"verb="*"type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"validate="false"/><addpath="ChartImage.axd"type="Telerik.Web.UI.ChartHttpHandler"verb="*"validate="false"/><addpath="Telerik.Web.UI.SpellCheckHandler.axd"type="Telerik.Web.UI.SpellCheckHandler"verb="*"validate="false"/><addpath="Telerik.Web.UI.DialogHandler.aspx"type="Telerik.Web.UI.DialogHandler"verb="*"validate="false"/><addpath="Telerik.RadUploadProgressHandler.ashx"type="Telerik.Web.UI.RadUploadProgressHandler"verb="*"validate="false"/></httpHandlers><httpModules><addname="RadUploadModule"type="Telerik.Web.UI.RadUploadHttpModule"/><addname="RadCompression"type="Telerik.Web.UI.RadCompression"/></httpModules></system.web><system.webServer><validationvalidateIntegratedModeConfiguration="false"/><handlers><removename="ChartImage_axd"/><removename="Telerik_Web_UI_SpellCheckHandler_axd"/><removename="Telerik_Web_UI_DialogHandler_aspx"/><removename="Telerik_RadUploadProgressHandler_ashx"/><removename="Telerik_Web_UI_WebResource_axd"/><addname="Telerik_Web_UI_WebResource_axd"path="Telerik.Web.UI.WebResource.axd"type="Telerik.Web.UI.WebResource"verb="*"preCondition="integratedMode"/><addname="CrystalImageHandler.aspx_GET"path="CrystalImageHandler.aspx"verb="GET"type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"preCondition="integratedMode"/><addname="ReportViewerWebControlHandler"preCondition="integratedMode"verb="*"path="Reserved.ReportViewerWebControl.axd"type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/><addname="ChartImage_axd"path="ChartImage.axd"type="Telerik.Web.UI.ChartHttpHandler"verb="*"preCondition="integratedMode"/><addname="Telerik_Web_UI_SpellCheckHandler_axd"path="Telerik.Web.UI.SpellCheckHandler.axd"type="Telerik.Web.UI.SpellCheckHandler"verb="*"preCondition="integratedMode"/><addname="Telerik_Web_UI_DialogHandler_aspx"path="Telerik.Web.UI.DialogHandler.aspx"type="Telerik.Web.UI.DialogHandler"verb="*"preCondition="integratedMode"/><addname="Telerik_RadUploadProgressHandler_ashx"path="Telerik.RadUploadProgressHandler.ashx"type="Telerik.Web.UI.RadUploadProgressHandler"verb="*"preCondition="integratedMode"/></handlers><security><requestFiltering><requestLimitsmaxAllowedContentLength="2147482624"/></requestFiltering></security><modulesrunAllManagedModulesForAllRequests="true"><removename="RadUploadModule"/><removename="RadCompression"/><addname="RadUploadModule"type="Telerik.Web.UI.RadUploadHttpModule"preCondition="integratedMode"/><addname="RadCompression"type="Telerik.Web.UI.RadCompression"preCondition="integratedMode"/></modules></system.webServer>
</div>

URL Rewrite configuration with appcmd.exe

$
0
0

I am trying to implement the following URL Rewrite config using appcmd

 

<system.webServer><rewrite><outboundRules><rule name="Add HttpOnly" preCondition="No HttpOnly"><match serverVariable="RESPONSE_Set_Cookie" pattern=".*" negate="false" /><action type="Rewrite" value="{R:0}; HttpOnly" /><conditions></conditions></rule><preConditions><preCondition name="No HttpOnly"><add input="{RESPONSE_Set_Cookie}" pattern="." /><add input="{RESPONSE_Set_Cookie}" pattern="; HttpOnly" negate="true" /></preCondition></preConditions></outboundRules></rewrite></system.webServer>

I can apply the 'preConditions' configuration with appcmd using the following:

appcmd.exe set config  -section:system.webServer/rewrite/outboundRules /+"preConditions.[name='No HttpOnly']" /commit:apphost
appcmd.exe set config  -section:system.webServer/rewrite/outboundRules /+"preConditions.[name='No HttpOnly'].[input='{RESPONSE_Set_Cookie}',pattern='.']" /commit:apphost
appcmd.exe set config  -section:system.webServer/rewrite/outboundRules /+"preConditions.[name='No HttpOnly'].[input='{RESPONSE_Set_Cookie}',pattern='; HttpOnly',negate='True']" /commit:apphost

 

However I am getting an error when tying to configure the rule using the following

appcmd.exe set config  -section:system.webServer/rewrite/outboundRules /+"[name='HttpOnly',preCondition='No HttpOnly']" /commit:apphost
appcmd.exe set config  -section:system.webServer/rewrite/outboundRules /[name='HttpOnly',preCondition='No HttpOnly'].match.serverVariable:"RESPONSE_Set_Cookie" /[name='HttpOnly',preCondition='No HttpOnly'].match.pattern:".*"  /commit:apphost
appcmd.exe set config  -section:system.webServer/rewrite/outboundRules /[name='HttpOnly',preCondition='No HttpOnly'].action.type:"Rewrite" /[name='HttpOnly',preCondition='No HttpOnly'].action.value:"{R:0}; HttpOnly"  /commit:apphost

The first cmd correctly creates the rule name and precondition.  However the next two cmds generate errors:

Failed to process input: Duplicate parameters passed: [name=HttpOnly

 (HRESULT=800700b7).

 

All of the command lines were generated by IIS's Configuration Editor.

Any ideas about how to get this configuration scripted?

 

Thanks


        

Windows Authentication not prompting with FQDN

$
0
0

I have an SSL-enabled IIS site (classic ASP on IIS 7.5) that uses only Windows Authentication. All other authentication options in IIS are disabled. Hence I'm expected to see a windows prompt when I access the site, but it's not occuring. If I access the site with the IP, however, it prompts as expected. Any idea why it does not take effect with the FQDN?

Thanks,

Sam

SMTP with mutiple Email addresses

$
0
0
Well this is the first time I have posted here on these forums. Now here is my question. I have IIS 6.0 set up on my Windows Server 2008 system and I am trying to set up multiple email accounts for multiple url's on the server I currently am running 5 Websites from this server and I am trying to set it up so each site has its own email@url.com, right now I have my PHP.ini file set up and I can send email that way, but all websites are sending their email from the default in the PHP.ini file. What I am trying to accomplish is when I send an email from url1 i want it to say its from @url1.com and when I send from url2 it says from @url2.com. Any help with this would be appreciated. Thank you.

Session events not fire in IIS 7.5 and Windows server 2008 R2

$
0
0

Hi all,

I have developed MVC4 application in VS Express 2012 for Web. In my website, I have a site statistics which is calculated by using Session_Start and Session_End events. In dev environment (IIS Express) these events fire when having new user accessing but in production server (IIS 7.5, Windows Server 2008 R2) nothing is happened.

Here are my Session events in Global.asax.cs

protected void Session_Start(object sender, EventArgs e)
        {
            Session.Timeout = 20;
            Application.Lock();
            Application["OnlineUsers"] = (int)Application["OnlineUsers"] + 1;
            Application.UnLock();

            // Update counter to DB here...           
        }

        protected void Session_End(object sender, EventArgs e)
        {
            Application.Lock();
            Application["OnlineUsers"] = (int)Application["OnlineUsers"] - 1;
            Application.UnLock();

            // Update counter to DB here...
        }

Some parameters in Web.config which I have tried to config but these events not fire :(

<system.web><compilation targetFramework="4.0" debug="true" /><authentication mode="Forms"><forms loginUrl="~/Account/Login" cookieless="UseCookies" domain="" timeout="20" protection="All" requireSSL="false" /></authentication><pages enableSessionState="true"><namespaces><add namespace="System.Web.Helpers" /><add namespace="System.Web.Mvc" /><add namespace="System.Web.Mvc.Ajax" /><add namespace="System.Web.Mvc.Html" /><add namespace="System.Web.Optimization" /><add namespace="System.Web.Routing" /><add namespace="System.Web.WebPages" /><add namespace="MVCVideo" /></namespaces></pages><sessionState mode="InProc" timeout="20" /></system.web>

Now I don't know how to fix this in production server. Could anyone help me, please?

Thanks and best regards,

Android Lee

Set up a 3 tier app (DNN/Umbraco) with IIS7 and SQL

$
0
0

hi,

I want to set up a 3 tier application with IIS and SQL in a distributed environment. Web Application Installer allows the application to be installed only by installing pre-requisites on the same server where the application/IIS is installed. Any pointers to the steps needed for 3 tier application and configuration will be helpful.


When AppPool\WebSite is set browser returns Access Denied.

$
0
0

I want to isolate a web site by granting IIS AppPool\WebSite required privileges. But, when I set identity as ApplicationPoolIdentity in the site application I get "Access Denied" error.

What I've done so far is:

- Add WebSite and its application (Application Pools).

- Set Identity as ApplicationPoolIdentity (WebSite application\Advance Settings).

- In authentication settings of WebSite, Anonymous Authentication, Anonymous user identity is set to "Application Pool Identity".

- Grant "IIS AppPool\WebSite"  "Read & execute", "List Folders Contents" and "Read" permissions to WebSite folder (I used command prompt, because OS version). I also set "Full" access, but I got same outcome.

- Since this procedure didn't work, I also tried adding a new user of the operating system and assigned it to the Application Pool Identity, and granted "Full" access to the WebSite folder... No luck.

I also noticed that when I set Identity as ApplicationPoolIdentity, User Name for w3wp.exe process is blank (Windows Task Manager).  But, when I set it as "Network Service" or "Local Service", they appear as owner of this process.

Any suggestions???

location path= in root of app and caching

$
0
0

hi.

i would like to add some caching rules to my configuration. I have one setting that works:

<location path="docs/Default.aspx">
  <system.webServer>
   <caching>
    <profiles>
     <add extension=".aspx" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="23:00:30" />
    </profiles>
   </caching>
  </system.webServer>
 </location>

Now, I my root directory, I would like to add the same caching for all .aspx-files. I can't seem to get this to work. I tried changing the "path" part to ".", to "~/" and to "~": nothing works - whenever I request an aspx from the root, I get a return code 200. (in the working example, I get 304, as expected.).

because this didn't work, I also tried "path=Default.aspx", in order to change the ttl just for the default page. no luck either. I haven't got the faintest idea what would be causing this. any suggestions?

WM_THX
-thomas woelfer

Vb script to get CPU and memory usage of application pools

$
0
0

Hi, Kindly assist me to get the CPU and memory usage of all application pools from a server through VB script.

IIS7.5 - HTTP Error 40417 - Not Found The requested content appears to be script and will not be served by the static file handler

$
0
0

I have Asp.net web form application developed in VS2008, which is running fine in development environment, but when I deploy it in server running IIS 7.5 on Windows Server 2008 R2 Standard,  Application Pool I used is .Net Framwork v2.0.50727, integrated,  I got the following error:

IIS7.5 - HTTP Error 40417 - Not Found The requested content appears to be script and will not be served by the static file handler

I tried different methods on Leo Tang's previous posting, like Handler Mappings - Revert to Parent,  but none of them work for me, I still get the same error.

Can someone help me with the issue, please?

Thank you very much.

Kind regards

Eddy

 

 

 

System.Media.SoundPlayer not working in IIS 7.5 (c#, asp.net)

$
0
0

Dear IIS (ASP.NET in C#) professionals,

I have an ASP.NET in C# Web application that works in IIS5.0 (hosted by Windows XP). The Website application was developed in Visual Studio 2008. The server side runs C# code to play a sound file "ZING.wav". When Web client use IE to browse the site, the server side code gets executed and the server side code play a sound file on server computer from the speaker attached to the server computer (not the client computer). My code on server side was "using System.Media; SoundPlayer snd = newSoundPlayer("ZING.wav"); snd.Play();". This code works in IIS5.0 (XP). However, when I try to port this application to IIS7.5 (Windows 7), the code got executed on server side but no sound gets played. Notice that in my setting, I am not trying to bring a sound file from the Web server to Web client and play the sound file on the Web client's computer (I have no problem with doing this).

I have tried to debug this issue and would like to provide you with the following additional information in hope that it may be helpful to you to resolve this issue for me.

1) My ASP.NET in C# Website code was originally developed in vs2008, System.Media.SoundPlayer is referencing to the assembly Microsoft.NET\Framework\v2.0.50727\System.dll

2) I can have exactly the same piece of Website code (Asp.net in C#) run within Visual Studio 2008, using ASP Development server (instead of the real IIS 7.5). No problem with playing the sound file from the server side code (ASP.NET in C#).

3) After I deployed my Website to IIS7.5 (Windows 7, on the same computer), all the Website functionalities continue to work (such as data retrieval on the server side) except that the sound file cannot be played any more on the server computer.

4) I tried to use IIS manager to configure IIS7.5 on the ASPNET Website, and made sure that the application pool that the Website resides is running under the same identity as it ran from within the Visual Studio 2008, with all the access rights assigned.

5) I had confirmed that when the code running under IIS7.5 in the deployed environment, right before the server code (to play the sound file) get executed, it is running under the right identity with all the access rights. I made sure so by debugging into the IIS7.5 hosted server code from Visual Studio 2008 (with attach to the right IIS worker process w3wp.exe), and using the code "using System.Security.Principal; String network_username = System.Security.Principal.WindowsIdentity.GetCurrent().Name;". However, I still cannot get the sound file played on the server computer speaker.

Question:

I suspect IIS 7.5 prevented ASPNET Website from playing the sound file. If so, how can we configure IIS 7.5 (windows 7) to allow the ASPNET Website code (on server side, ASP.NET in C#) to be able to play sound file on server computer - "using System.Media; SoundPlayer snd = newSoundPlayer("ZING.wav"); snd.Play();"?  Exactly the same piece of code works (originally) in IIS5 (XP) environment.

Thank you for your help.

Viewing all 780 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>