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

web.config rewrite rule all php to html - not show image and css

$
0
0

Hy, i have a big problem with my website, i was trasnfer from a linux host to a windows server host, and after when i finish trasnfer, i was make web.config file :

<?xml version="1.0" encoding="utf-8" ?><configuration><system.webServer><rewrite><rules><rule name="rule 1R" stopProcessing="true"><match url="^(.*)$"  /><action type="Rewrite" url="/index.php/{R:1}"  /></rule></rules></rewrite></system.webServer></configuration>

befour to make web.config site was look nice and all ok but url is not work, after when i make web.config url was work but css and images is not load.

How to fixe that ?


want to redirect any page after // to new url

IIS cannot connect to network shares

$
0
0

Hello,

I'm trying to have IIS to access shares from my synology rackstation.
While i can normally see the shares using windows explorer (windows admin account is the same as synology admin account), shares are not accessible from IIS.
The only way i've found for IIS to access shares is if I give full access to "Everyone", which is ofcourse not the best practice.

I have tried configuring IIS to connect with the same credentials I access the synology shares in Windows Explorer, but it does not work.

I'm baffled. Any suggestions ?

Thanks

Alex

Rules preventing image hot linking

$
0
0

Hi,

My site has gone from http:// to https://

Site: asp net 2.0, IIS 7.5

These rules worked to stop hot linking to my images on my site under http:// but failed to work under https://

See hot link code in BOLD, I have shown my other ruiles, just in case the obstruct other rules.

Question: How can I stop hit linking of my images under https:// by other sites on the web???

NOTE: I tried to replace the Http with https but that did not work in the hot lnk rules.

<rewrite><rules><rule name="Redirect to HTTPS" stopProcessing="true"><match url="(.*)" /><conditions><add input="{HTTPS}" pattern="^OFF$" /></conditions><action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" /></rule><rule name="Redirect domain.com to www" patternSyntax="ECMAScript" stopProcessing="true"><match url=".*" ignoreCase="true" /><conditions><add input="{HTTP_HOST}" pattern="^MySite.com$" negate="false" /></conditions><action type="Redirect" url="http://www.MySite.com/" redirectType="Permanent" /></rule><rule name="Prevent image hotlinking"><match url=".*\.(gif|jpg|png|jpeg|bmp)$" ignoreCase="true"/><conditions><add input="{HTTP_REFERER}" pattern="^$" negate="true" /><add input="{HTTP_REFERER}" pattern="^http://www\.MySite\.com/.*$" negate="true" /><add input="{HTTP_REFERER}" pattern="^http://images.google\.com/.*$" negate="true" /></conditions><action type="Rewrite" url="/images1/Hotlink1.png" /></rule><rule name="Redirect google spam URL" patternSyntax="Wildcard" stopProcessing="true"><match url="*" ignoreCase="true" /><conditions><add input="{HTTP_REFERER}" pattern="*google.co.uk/url?sa=t*" negate="false" /></conditions><action type="Redirect" url="https://www.google.com/>" /></rule></rules></rewrite>

Bad Request

$
0
0

I do not know where is the problem , after configuring web server IIS , I try to navigate localhost but i have bad resquest error 

Authentication with Credentials in a Database Table

$
0
0

Hi,

I am looking for the equivalent feature in ISS compared to the Apache module "mod_authn_db".

All I want is authorization with credentials that reside in a SQL-Server database table.

What would be the right approach in IIS.

Best Regards,
Stefan

IIS7 status code 500

$
0
0

Hello,

on windows 2008r2 server with iis7 we are hosting WCF service. Client is a .NETwinforms application.

Authentication is set in web.config to windows <authentication mode="Windows" />. Application pool is running under domain account.

Clients are autheticated using their domain accounts, server handles these accounts and send informations back to client based on this accounts and their application permissons.

Everything is working, but sometimes the client gets wcf exception with code 500. Count of this error is from 3 to 10 per day. The application pool is not in iddle, because the iis log says, the requests and response are before and after handled without problems with status 200.

Tried the failed request tracing, where the error 500 is saved to xml file.

No.      Severity   Event   Module Name
80.view traceWarning-MODULE_SET_RESPONSE_ERROR_STATUS  <div class="hidden" id="section_errors_80_details" style="display: block;">
ModuleNameServiceModel
Notification2
HttpStatus500
HttpReasonInternal Server Error
HttpSubStatus0
ErrorCode0
ConfigExceptionInfo
NotificationAUTHENTICATE_REQUEST
ErrorCodeThe operation completed successfully. (0x0)
</div>
ServiceModel

In compact view there is a detail of the warning causing the error with event name "MODULE_SET_RESPONSE_ERROR_STATUSWarning" and detail:

"ModuleName="ServiceModel", Notification="AUTHENTICATE_REQUEST", HttpStatus="500", HttpReason="Internal Server Error", HttpSubStatus="0", ErrorCode="The operation completed successfully.
 (0x0)", ConfigExceptionInfo=""

"

How can I detect what exactly is wrong, or where to look, what to do next to detect the problem?

The strange thing is, it is not happening every time...sometimes. The application is working, but sometimes the server returns 500.

Thank you very much form any help.

Marian

MSDeploy - deploy site and runcommand

$
0
0

Hi,

Below command is working as expected for deploying package to IIS with configured parameters in ProjectParameters.xml.

msdeploy.exe
-source:package='e:\deploy\ProjectApp.zip'
-dest:auto,includeAcls='False'
-verb:sync
-setParamFile:"e:\deploy\ProjectParameters.xml" 

In addition to this, would like to run the batch file using runCommand(path: 'e:\deploy\ProjectBatch.bat') along with deployment.
Have tried with source:manifest=ProjectManifest.xml option.

But either source:package or source:manifest shall be used at once.

It would be great  if provided with any best approach to solve this issue.

Thanks,
Saravana.


ServerXMLHTTP returning the same responseText with simultaneous requests

$
0
0

Hello,

It's the first time I post something in a forum (although I check them all the time), so I hope I explain myself right.

I'm stuck in a problem with ServerXMLHTTP.

When there's just one individual request, it returns the expected result. But if they happen at the same time, responseText returns for the slowest one the same result as the faster simultaneous one. 

It's been reported by the users, but I tested it running the pages on two different browsers in my pc. I trigger one request and immediately I click on a different one on a different instance of the browser or a different browser.

Here is my code:

Set xmlHttp = Server.Createobject("MSXML2.ServerXMLHTTP")
On Error Resume Next
xmlHttp.Open "GET", "http://someserver/somepath/?somequerystring" , False
xmlHttp.setOption 2, 13056 'ignore all SSL Cert issues
If Err Then 'handle errors
Response.Write(Err.Description & " [0x" & Hex(Err.Number) & "]<BR><BR>")
Response.End
End If
On Error Goto 0
xmlHttp.setRequestHeader "User-Agent", "asp httprequest"
xmlHttp.setRequestHeader "Content-Type", "text/json"
xmlHttp.Send
resultatJSON = xmlHttp.responseText
xmlHttp.abort()
set xmlHttp = Nothing

Hope my explanation was clear.  And sorry if I misused some term, English is not my mother tongue.

Many thanks in advance!!

Receive an alert when a distinct URL is hit on my WEB server

$
0
0

I want to set up something that will tell me (preferably by email) when someone hits a distinct URL
on my WEB server. Say I give out a WEB site for an issue I'm woring on.
In it I may say something like "For screen shots I have .jpg at
www.aanning.com/Challenger_rtsp/FL0.jpg

I want to know if they actually went out to that site.  I'm currently using
Microsoft Internet Information Systems, version 6 build 9200, Windows 8.1 enterprise
and it does log this. In my log file,it will have:

2017-04-09 23:37:08 192.168.1.100 GET /Challenger_rtsp/FL0.jpg - 80 - 24.212.49.123 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko http://www.challengertalk.com/forums/f19/fog-light-replace-2015-challenger-rt-scat-pack-336289/ 200 0 0 2521

I can see when, where and even who actually went to the site.

I have not seen any feature in IIS that does this. One way would be is if
I could call wingrep from a .bat file and pass it parameters to search on,
if found, send me an email, I don't think that is possible.
If I knew .NET, (I do Not),  write a script to search each .log file from IIS for a string.
I could use task scheduler to set it up to run regularly.

Any suggestions?

URL Rewrite following upgrade from SharePoint 2007 to 2013

$
0
0

Hi All,

We have upgraded our SharePoint farm from 2007 to 2013 using a migration method. The old farm used sharepoint.diamond.ac.uk/sites/default/SITENAME... The 2013 farm uses the URL sharepoint.diamond.ac.uk/SITENAME...

I have been trying to use the URL Rewrite tool to make all our old intranet links work but it just will not redirect/rewrite/whatever. 

The rule we have is:

<rewrite>
<rewriteMaps>
<rewriteMap name="2007 to 2013">
<add key="/sites/default/" value="/" />
</rewriteMap>
<rewriteMap name="http->https" />
</rewriteMaps>
<rules>
<rule name="Rewrite rule1 for 2007 to 2013" enabled="true">
<match url="(.*)" />
<conditions>
<add input="{2007 to 2013:{REQUEST_URI}}" matchType="Pattern" pattern="/sites/default(.*)$" ignoreCase="true" negate="false" />
</conditions>
<action type="Redirect" url="/{C:1}" appendQueryString="false" />
</rule>

</rules>

</rewrite>

Can anyone give me any pointers?

Thanks

Nick

Multiple rule with conditions

$
0
0

Hi,

I'm not an expert in IIS and I have an issue with the URL Rewrite Module.

I'd like to redirect these following URL :
http://myHostname to httpS://myHostname.myDomain.com
httpS://myHostname to httpS://myHostname.myDomain.com
http://myHostname.myDomain.com to httpS://myHostname.myDomain.com
httpS://myHostname.myDomain.com to the same URL

The same thing when there are parameters :
http://myHostname/myParameters to httpS://myHostname.myDomain.com/myParameters
httpS://myHostname/myParameters to httpS://myHostname.myDomain.com/myParameters
http://myHostname.myDomain.com/myParameters to httpS://myHostname.myDomain.com/myParameters
httpS://myHostname.myDomain.com/myParameters to the same URL

Actually, I have one rule :
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}.myDomain.com/{R:1}" appendQueryString="false" redirectType="Found" />
</rule>

But with this rule, all cases don't work.

Could you help me ?

Thank you in advance for your time,

Kevin

ERROR_WINHTTP_INTERNAL_ERROR for apppool identity trying to do OCSP

$
0
0

Hi

I have a problem with http within the context of apppooluser / network services

The problem manifest itself as the IIS can’t do OCSP validation, the IIS site requires Client certificate. If turn of OCSP validation for the site, the site works.

But on the site, I have is a webservice (C#) that also does certificate validation (within code) that fails as long as the apppool uses apppool identity, if I use a local account for the apppool it works.

I wrote some code that calls certutil from within the webservice and it produces following errors:

 

>certutil.exe -urlcache delete

 

****  OFFLINE  ****

CertUtil: -URLCache command FAILED: 0x80072ee4 (WinHttp: 12004 ERROR_WINHTTP_INTERNAL_ERROR)

CertUtil: An internal error occurred in the Microsoft Windows HTTP Services

 

>certutil.exe -urlcache

 

<some urls> ... WinHttp Cache entries: 6\r\n\r\nCertUtil: -URLCache command FAILED: 0x80072ee4 (WinHttp: 12004 ERROR_WINHTTP_INTERNAL_ERROR)\r\nCertUtil: An internal error occurred in the Microsoft Windows HTTP Services\r\n"

 

CAPI2 log confirms the failure, but running Wireshark reveal that no network traffic is created to the OCSP server when CAPI should calls it for validation.

Running code within the webservice that gets the url of the OCSP/CRL it work fine.

I cant see that any proxy is used. And I also added no proxy in the web.config to be sure, but that made no difference.

 

I stopped worked sometimes around the time I upgrade to Windows 10 Creator, but I also have my suspicions on Docker.

Are there any good ways to repair HTTP.sys servicen or trace the HTTP Services to see what happens?

The only related case I could find was this but not much help to solve the problem.

https://forums.iis.net/t/1229052.aspx?IIS+CertUtil+errors

redirect HTTPS URL to a different domain

$
0
0

I have a domain X which runs at HTTP://www.X.com and would like any HTTPS traffic to that domain (assuming someone enteredHTTPS://www.X.com) to redirect it to HTTPS://www.Y.com 

I have tried this but it does not work:

<rule name="redirect http" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTPS}" pattern="off" />
</conditions>
<action type="Redirect" url="https://www.Y.com" redirectType="Found" />
</rule>

I wondered what I am doing wrong

CPU throttling not working IIS 10

$
0
0

Hi

We have a VM server Windows 2016 in Azure which has IIS 10 installed. All is going great except for CPU throttling. It just does not work on this Windows 2016 and/or IIS.

Settings for the app pool are:

- Limit: 90
- Limit action: Throttle
- Limit Interval: 5

In Windows 2012R2 it all worked perfectly.

I have looked at Windows System Resource Manager (WSRM) but thats not supported anymore. 

It is safe to say that IIS 10 is useless without this feature.

I hope you can help !


Allow IP range and AD group access to web portal

$
0
0

Hello,

I'm looking for some help in allowing a specific AD group coming from a specific IP range access to our web portal running on IIS.

This is the problem I'm trying to solve: We have multiple users in specific AD groups that have access to a web portal. What we want to accomplish is forcing one of those groups to only be able to access the portal from a specific IP range but allowing all the other groups to access the portal from any IP address.

I looked at "IP Address and Domain Restrictions" and "Authorization Rules" and neither give me the ability as far as I can see.

 Here is the version of IIS and Windows we are running: IIS Version 8, Windows Server 2012

Thank you for any help in figuring out some type of solution for this.

SignalR websocket fails with unexpected response code 502 (IIS 8.5 / ARR 3.0)

$
0
0

When trying to establish a web socket connection using SignalR I get an unexpected response error 502.

IE 10 reports: 'WebSocket Error: Incorrect HTTP response. Status code 502, Bad Gateway'

Chrome reports: 'WebSocket connection to 'wss://domain/root/signalr/connect?transport=webSockets&client....' failed: Error during WebSocket handshake: Unexpected response code: 502'

....and after this SignalR then falls back to another transport - so everything still works, but i really want to get this working using web sockets.

When I connect directly to the server, everything works as it should.

I have spend about 3-4 days now searching for how to get SignalR 2.2.1 working with an IIS 8.5, in WindowsServer 2012 R2, ARR 3.0.

I am using SSL/https - I have sticky sessions configured, same machine key on all my back end servers.

I have setup a test system, that has only a single server behind a single ARR load balancer, I have tried every suggestion that I can find but I still cant find a solution - or for that matter anyone indicating that they have successfully configured this even though Microsoft claim it is support "with no extra config".

Can anyone point me towards a guide or reference for getting this working ?

What other steps should I be trying to debug this configuration ?

Can anyone confirm it even works - or even that it does not work ?

I asked on stackoverflow but so far haven't had even a single response after a week - I really like ARR & URL Rewrite, I have used it for quite a few years now with millions of requests a day going through it, but with the lack of any documentation or assistance for ARR in general I am having to seriously consider finding another solution ....

https://stackoverflow.com/questions/44092063/signalr-websocket-fails-with-unexpected-response-code-502-iis-8-5-arr-3-0

If anyone can actually help me get this working I will take the time to write some documentation on how to make it work - step by step, with all the source code for a test SignalR app, all the configuration for IIS, ARR, UrlRewrite - and post it all on github, microsoft docs or somewhere that others can find !

ARR working until Login

$
0
0

Hello All,

               I have the Server farm currently working with two web servers. When I go tohttp://ARRIP/page.aspx the login page populates, but as soon as I log in I get "An error has occurred". If I go directly to each of the web servers, the website works as designed. Ideas what could be causing this behavior? 

-Joe

IIS Site Losing Ability to Authenticate With NTLM

$
0
0

We are having a recurring issue with one of our servers that I am not sure how to troubleshoot. The server is used to host an instance of Microsoft TFS and every few weeks Windows Authentication suddenly stops working on the TFS website. When this happens we get the default browser login prompt after navigating to the TFS site but are unable to log in. The problem appears to be in IIS and a simple restart of the TFS app pool fixes the issue but I would like to discover the root cause. Can anyone point me in the right direction on fixing this?

Here's some additional information that may be helpful:

  • I have not been able to log in using local or domain account from either remote PCs or on the server after I remoted into it.
  • The site is configured to use NTLM Authentication and I verified with Fiddler that this is what is failing.
  • In the IIS logs I see that I am getting the error 401 1 2148074254 in response to requests that include an NTLM token.
  • The TFS application pool is a v4.0.30319, Integrated pool configured to use a domain account which is a local admin as it's identify.
  • The server is a Windows Server 2012 R2 with IIS 8.5.

Configure two angularJS applications

$
0
0

Hi,

I have two applications which needs to be configured under one domain. Please find the below scenario.

Applilcation Name 1: https://www.domain.com This is my main angularJS application

Applicatiion Name 2: https://www.domain.com/employees This is my second angular JS application

Applicatiion Name 2: https://www.domain.com/customers This is my third angularjs application

I need to maintain the all three applications in separate projects. But, there is a restful service which is common for all.

Can you please guid me how to configure this.

Thanks in advance.

Viewing all 27852 articles
Browse latest View live




Latest Images