Quantcast
Channel: All Forums
Viewing all 28504 articles
Browse latest View live

Response.IsClientConnected causes exceptions

$
0
0

We recently tried incorporating Response.IsClientConnected into our asp.net site, but it causes seemingly random exceptions that only show up when we check this property.  If we comment out that code, we stop getting the exceptions.  We get a ton of items in our log file indicating that we have disconnected clients and we are still doing processing, so it is clearly an opportunity for optimization, but we need to figure out what is going on with the exceptions first.  Any idea what is causing this exception and how we can we work around it?

Our site is hosted on Windows Server 2008 r2 x64 with IIS 7.5 and .NET 4.5.

If Not Response.IsClientConnected Then
    ' write to log file
End If

We are getting the following exception (again, seemingly random and only when we have the check for IsClientConnected live on our site):

System.Runtime.InteropServices.COMException (0x800703E3): The I/O operation has been aborted because of either a thread exit or an application request. (Exception from HRESULT: 0x800703E3)


W2K8 IIS8 web site not serving .aspx pages remote client sees website is online but isn't responding to connection attempts

$
0
0

Windows Server 2012 IIS8 version 8.5.9600.16384

Default site's http://localhost/iis-85.png seen from client across intranet (internal only), but when I added a web site with .aspx pages client gets only 'This page can't be displayed.'  "Fix connection problems" returns msg at bottom which states: 'website (myleave) is online but isn't responding to connection attempts.'. 

- No error msg in Application Event Logs

- Windows Firewall off for Domain, Private, Public profiles

- Server Manager installed IIS with 'runas Administrator' and included:  Common HTTP Features, Health and Diag (logging), Performance (Static Content Compression), Security (Request Filtering, basic auth, widows auth), Application Development (.NET Extensibility 3.5, .NET Extensibility 4.5, ASP.NET 3.5, ASP.NET 4.5, ISAPI Extensions, ESAPI Filters)

<form> <div class="page"> <div tabindex="0" style="float: right;" print="false">Print</div> <div>
<div class="clip" nowrap="nowrap">Windows Network Diagnostics</div>Publisher details
</div>
Issues found
<div class="clip" nowrap="nowrap">website (myleave) is online but isn't responding to connection attempts.</div> <div class="popup" id="popup_2" style="display: none;"> <div class="title" style="padding: 0px 0px 3px;">website (myleave) is online but isn't responding to connection attempts.</div> The remote computer isn’t responding to connections on port 80, possibly due to firewall or security policy settings, or because it might be temporarily unavailable. Windows couldn’t find any problems with the firewall on your computer. </div> <div>Detected</div> Detected
<div class="clip" nowrap="nowrap" style="padding: 2px;">Contact the service provider or owner of the remote system for further assistance, or try again later</div><div style="padding-top: 2px;"> <div class="italic">Completed</div> </div>
<div class="block"> <div>
<div class="clip" nowrap="nowrap">Issues found</div> Detection details
</div>
<div tabindex="0" class="arrows" id="e_c_rc_3" style="width: 14px; height: 14px; padding-top: 2px;" bullet="true" alttext="5">6</div>website (myleave) is online but isn't responding to connection attempts.<div>Detected</div> Detected
<div style="width: 420px;">The remote computer isn’t responding to connections on port 80, possibly due to firewall or security policy settings, or because it might be temporarily unavailable. Windows couldn’t find any problems with the firewall on your computer. </div>
<div id="c_rc_3" style="display: none;" expand="true">
Contact the service provider or owner of the remote system for further assistance, or try again later<div class="italic">Completed</div>
</div>
</div> <div class="block"><div>
<div class="clip" nowrap="nowrap">Detection details</div> <div tabindex="0" style="float: right;" print="false">Expand</div>
</div> <div id="c_Detection" expand="true">
<div style="float: left;">Informational</div> <div style="margin-left: 20px;">Network Diagnostics Log</div>
File Name:79F406D4-EC14-41C8-AF39-1F76EA52570C.Diagnose.0.etl
<div style="float: left;">Informational</div> <div style="margin-left: 20px;">Other Networking Configuration and Logs</div>
File Name:NetworkConfiguration.cab
Collection information
Computer Name:xxxxDEV015 (obscured for security)
Windows Version:<div class="clip">6.2</div>
Architecture:<div class="clip">x64</div>
Time:<div class="clip">Friday, June 26, 2015 10:24:53 AM</div>
</div> </div> <div class="block"><div>
<div class="clip" nowrap="nowrap">Publisher details</div> <div tabindex="0" style="float: right;" print="false">Expand</div>
</div> <div id="c_Publisher" expand="true">
Windows Network Diagnostics
Detects problems with network connectivity.
Package Version:<div class="clip">1.0</div>
Publisher:<div class="clip">Microsoft Windows</div>
</div> </div> </div> </form>

Wincache session handler crash

$
0
0

On latest Wincache 1.3.7.6, tested on PHP 5.5.26.

In php.ini use:

session.save_handler = wincache

Now set session storage path to unexistent location:

session.save_path = "D:\caca\"

Script 1

<?php

session_start();

print "<html><body>WORKS</body></html>";

PHP FATALS with the following message (expected):

Fatal error: session_start(): Failed to initialize storage module: wincache (path: D:\caca\)

Script 2

<?php

class WincacheSessionHandler extends SessionHandler {
  public function read($session_id) {$data = parent::read($session_id);
  }
}

// Initialize the storage
$handler = new WincacheSessionHandler();
session_set_save_handler($handler, true);

session_start();

print "<html><body>WORKS</body></html>";

You get a WSOD crash (not a PHP fatal):

Faulting application name: php-cgi.exe, version: 5.5.26.0, time stamp: 0x5578a6fc
Faulting module name: php_wincache.dll, version: 1.3.7.6, time stamp: 0x556cd721
Exception code: 0xc0000005
Fault offset: 0x000163bf
Faulting process id: 0x588
Faulting application start time: 0x01d0ad4649943c17
Faulting application path: C:\Program Files (x86)\PHP\php5.5\php-cgi.exe
Faulting module path: C:\Program Files (x86)\PHP\php5.5\ext\php_wincache.dll
Report Id: 88887401-1939-11e5-83b0-8019346bbdc6
Faulting package full name:
Faulting package-relative application ID:

Not a big deal, but makes a nightmare to troubleshoot a broken session storage path :(

change home directory of SMTP virtual server IIS6.0

$
0
0

Hello. How do I change home directory where the SMTP content subdirectory root stays. Mind this is for a SMTP Virtual Server.
*Other than creating a new server.

URL Re-write help! From Apache to IIS...

$
0
0

Hi guys,

I'm very very new to IIS, and I've been trying to read up on IIS and URL re-write to get my website going. I was forced to move as my current host aren't capable to supply what I need to get my site going.

My previous server was running on Wamp + Apache and had a .htaccess like this:

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.htm$ index.php?p=$1 [NC]

How can I convert this to web.config or to add in the URL Rewrite Rules module? I've tried online converter and don't understand how to apply these rules..

Thanks for any help given!

Regards,
Jonn W

Enabling Smartcard login with username hint

$
0
0

Is it possible to configure IIS to prompt for Smartcard authentication WITH the ability to specify a username hint?  (Refer here if you're not familiar with username hints.)

We already have username hints enabled in the environment, in order to allow authentication as alternate accounts using the same smartcard.  I can already do a run-as different user when I launch IE, specify the smartcard reader, and enter the username hint there.  The problem is that I need to be able to do this on a given IIS site, without launching IE separately like that.

If I'm explaining that poorly, let me know and I'll try to clarify.  Thanks!

Pulling variable from URL

$
0
0

I have a page that loads data from a database.  I have an If Else statement setup to query the data based on if a ?letter= is appended to the end of the URL but it's not working.

Can anyone tell me why?

<%
    strLetter = Request.QueryString("letter")
    If IsEmpty(strLetter) Then
       'Query if no letter is appended
       'This works
    Else
       'This does not work
       SQL = "SELECT * WHERE subject = " & strLetter
    End If
%>

Execute batch script from classic asp in IIS 8.5

$
0
0

I have a classic ASP page that creates a bat file and runs it.  It works in 2003 IIS6, but it will not run in 2012 IIS 8.5.  NewJob.bat is created fine, but it does not execute.  I cannot find the right option in IIS to enable "Scripts and Executables" for the execute permission.  Does anyone have a solution?


	Set fso = CreateObject("Scripting.FileSystemObject")
	SitePath = Server.MapPath(".")
	BatchPath = SitePath & "\NewJob.bat"
	Set file = fso.CreateTextFile(BatchPath, true)
	file.WriteLine("@echo off")
	file.WriteLine("Call BuildJobFolder.bat " & JobYear & " " & JobNumber & " " & JobName & " > BJF.log")
	file.Close
	dim cmdShell, objCmd, strResult, objResult
	set cmdShell = Server.CreateObject("WScript.Shell") 
	cmdShell.CurrentDirectory =  SitePath
	objResult = cmdShell.Run("cmd /c " & SitePath & "\newjob.bat", 10, true)
	strOutput = ""
	set Results=fso.OpenTextFile(SitePath & "\BJF.log",1,false)
	do while not Results.AtEndOfStream
		strOutput = strOutput & chr(13) & chr(10) & Results.readline
	loop
	Results.close 
	Set cmdShell = nothing 
	Set objResult = nothing 


outbound rules for custom tags with data-* attributes not working

$
0
0

This is what i'm having trouble with.
The outbound rules that work with regular attributes do not work with custom tags

for example
if i have <img src="/images/misc/something.jpg" data-src="/images/misc/somethingelse.jpg" />

the outbound rule will rewrite this as

<img src="http://mycdn.com/images/misc/something.jpg" data-src="/images/misc/somethingelse.jpg" />

notice that the data-src attribute is not modified even tough my custom tag was supposed to take care of it with the<tag name="img" attribute="data-src" /> part

Similarly

Doesn't work
<li data-bg-img="/Images/splash-screen/splash-home-2.jpg" class="splashli" style="background-color:#e79421;">
Doesn't work
<li class="splashli" style="background-color:#e79421;" imgsrc="/Images/splash-screen/splash-home-2.jpg" >


Works!!!!!!!!
<li imgsrc="/Images/splash-screen/splash-home-2.jpg" class="splashli" style="background-color:#e79421;">
is rewritten as
<li imgsrc="http://mycdn.com/Images/splash-screen/splash-home-2.jpg" class="splashli" style="background-color:#e79421;">

What has changed? i moved the imgsrc attribute from being the last to being the first attribute of the <li> tag.
However notice that this has no effect with attributes that have hyphens. i.e. "data-bg-img"

judging from this post, i'm beginning to think there're some bugs with urlrewrite module and they still haven't been fixed since 2009. Any word on how to fix this? aside from ding filterbytag="none" which is a big performance hit. I've tried failed request tracing and i can't find anything wrong.

here're the outbound rules.

<outboundRules><clear /><rule name="Out_Rewrite_cdn_http" preCondition="ResponseIsHtml" enabled="true" stopProcessing="true"><match filterByTags="A, Img, Link, Script, CustomTags" customTags="imgDataSrc" pattern="^/(Images(?!(/cart-item|/uploads))|Scripts|Styles)/(.*)$" /><action type="Rewrite" value="http://mycdn.com{R:0}" /></rule><preConditions><preCondition name="ResponseIsHtml"><add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" /><add input="{URL}" pattern="\.axd.*$" negate="true" /><add input="{URL}" pattern="\.ashx.*$" negate="true" /></preCondition></preConditions><customTags><tags name="imgDataSrc"><tag name="img" attribute="data-src" /><tag name="li" attribute="data-bg-img" /><tag name="li" attribute="imgsrc" /></tags></customTags></outboundRules>

Application pool lost credentials

$
0
0

Hi all,

The situation is as follows:

ARR with farm:

3 IIS 7  with shared conf

Shared conf I  wwwroot are located  in \\xxx.xxx.xxx.xxx\wwwroot and \\xxx.xxx.xxx.xxx\rootconf

When restart the server from which the folders are shared, all web servers become blocked with :

The worker process for application pool 'specificpoolforsite' encountered an error 'Configuration file is not well-formed XML

' trying to read configuration data from file '\\?\C:\inetpub\temp\apppools\specificpoolforsite\site.config', line number '3'.  The data field contains the error code.

 

Source: IIS-W3SVC-WP

EventID: 2307

 

With restart of IIS and restart of Windows server, nothing changes, it displays the same error.

It could be fixed  only manually with entering each and every one of the servers, by repeating already loaded credentials on each apppool, after that making “recycle” of each apppool, restart on each site and only after that the websites start to work.

My question is as follows.

Is there some way to avoid all of that and when returned shared resources online IIS to be able to work as it was working before?

Regards,

Jeff

URL Rewrite to Java application

$
0
0

Hi

I hope someone her can help me. Basically what I try to achieve is to use ISS7 (win2208 r2) to give users a easy to remember URL on port 80. 

I have x number of java application running on same server but different port on a single java server. The application is the same but it is for different customer. I have a IIS server exposed to the internet and what that to rewrite to the java server. Something like this:

https://webserver.domain.org/customer1-app -> http://JavaServer.domain.org:1/app/
https://webserver.domain.org/customer2-app -> http://JavaServer.domain.org:2/app/
https://webserver.domain.org/customer3-app -> http://JavaServer.domain.org:3/app/

 

So fare I have figured out to add an application to the default web site (ex customer1-app) and using the URL rewrite to make the rule:

<rule name="Rewrite customer1" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://JavaServer.domain.org:1/app/{R:1}" />
</rule>

Will display a page on  https://webserver.domain.org/customer1-app. The style sheets and links on the page on the other hand is still thinking it is on the relative path /app so I added outbound Rules:

<rule name="links and css">
<match pattern="app" />
<action type="Rewrite" value="customer1-app" />
</rule>

Unfortunately this did not make it work proper. Yes, the style sheets loaded but I do not think java script or other references is loading. Using toll to inspect the html I do see the change in the Link and script changing form <script src="/app/js/lib/underscore-1.8.2.js"></script> to <script src="/ customer1-app/js/lib/underscore-1.8.2.js"></script> but the links and text ar all showing Java variable names like <a id="loginButton" href="#" class="btn btn-primary">{{'login_3' | translate}}</a>

Am I doing something impossible or am I just missing some rules?

If you can help, thank you for taking the time to do so. It is appreciated.

Running a .NET 4.6 MVC application on IIS 8.5 (Windows Server 2012)

$
0
0

Hi there

I have an MVC Web API 2 application that I am running quite successfully locally within Visual Studio 2015 RC. I have also successfully published this application to an IIS 8.5 instance running on Windows Server 2012. I have installed .NET Framework 4.6 on this machine also.

The behaviour that I am getting when I try to navigate to the root of the site (http://localhost:81) is that I get a directory listing of the files in the root folder. Clearly I was expecting the routing config of the application to kick in an execute the home controller, but this is not happening.

I am a developer and it has been some time since I configured IIS, but I do remember that I had to do some fiddling with IIS (6?) to get the routing to work.

What am I missing?

J

Help! How to implement it with ARR

$
0
0

Dear Expert,

I want to build Streaming Media server on windows 2012 R2. We have 3 sites in 3 different cities. They are connected via MPLS.

There are 3 servers in 3 sites which is used for the Media server

A site        s1.domain.test.com   

B Site        s2.domian.test.com

C Site        s3.domian.test.com

For saving the WAN resources, I want to internal users only access local media server. like:

user1 now is in A site, he/she access s1 when he/she open the video link.

When user1 travel to B Site, he/she access s2 when he/she open the video link.

I want to publish only one url, like videos.test.com to internal users. How could implement the idea?

ARR cache can do this, and how. 

Microsoft ftp - stop when physical path not accessible

$
0
0

I have an industrial system (camera) set up that sends image files via windows ftp to a mapped storage location. Sometimes the storage location becomes no longer accessible by windows. Since Windows ftp server is still running and the connection is still active the industrial device buffers the files. The equipment will run until the buffer fills and then crashes. This results in a loss of all data from the time the storage location stopped being accessible to Windows until the time the device crashes.

Is there a way to set Windows ftp to stop once the set physical path is no longer accessible? If I can get Windows ftp to automatically stop then the connection to the industrial device will be stopped and the device can handle the error to prompt for user intervetion.

 

What does 4294967295 stand for in 'Processor Affinity Mask' in detail?

$
0
0

Hi,

What does 4294967295 stand for in 'Processor Affinity Mask' in detail? I mean, if I divide it by 1024 * 1024 * 1024 it is exactly 4, which looks like the 4 GB memory limit in 32bit systems...


ODBC Logging from DMZ IIS Server

$
0
0

I've been following articles on setting up IIS 8.5 to log to a SQL 2008 R2 Server.

My IIS 8.5 server is in the DMZ on Windows Server 2012 R2 and is not a domain member.

My SQL server is SQL Server 2008 R2 in the private network and is a domain member.

I have opened up firewall communications between the two servers.

If anyone has succeeded in getting this to work, please provide detailed steps.  I've been following numerous articles with no success.  When I browse to the Default Web Site page, I receive a 500 error.  There are no events in the Event Viewer to describe what's going wrong.

MediaWiki Download Link Broken

Internal Server Error

$
0
0

We have a new Server 2012 R2 installation and trying to browse the default website via IIS on the sever but receiving the following error:

HTTP Error 500.19 - Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

Error Code   0x800700b7
Config Error   There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined

Config Source:

13:  <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">   14:  <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
   15:  <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

I have commented out the lines in red but that creates more errors.  Any solution suggestions or recommendations would be most appreciated.

Thank you in advance.

Adding a new web site

$
0
0

Hello everyone:

Environment: Windows Server 2012,  IIS 8.0

I am trying to set up a new web site and when I try http://localhost:8080/geoserver/ in the browser  I get:  

HTTP Error 404.0 - Not Found

Detailed Error Information:

<div id="details-left">
Module   IIS Web Core
Notification   MapRequestHandler
Handler   StaticFile
Error Code   0x80070002
</div> <div id="details-right">
Requested URL   http://localhost:8080/geoserver/
Physical Path   C:\Program Files\GeoServer\geoserver\
Logon Method   Anonymous
Logon User   Anonymous
</div>

 

The default web site is working fine.

The index.html is under the path C:\Program Files\GeoServer\webapps\geoserver

The physical path is C:\Program Files\GeoServer

Any help will be appreciated.

Thank you

JJ

IIS8 Failed Request Tracing is missing Rewrite option

$
0
0

I have URL Rewrite rules that are not triggering as expected so I wanted to use the Failed Request Tracing as I've done in the past.  However this is the first time I've used URL Rewrite & FRT on an IIS8 server.  When you get to the Select Trace Providers stage of the FRT creation and click on WWW Server on the IIS7 server I have a Rewrite option.  However on the IIS8 server there is no option.

The server has been rebooted since installation and I installed the latest URL Rewrite v2 from the website.

Viewing all 28504 articles
Browse latest View live


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