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

Redirect only specific sub site not root/other sub sites

$
0
0

I am trying to use IIS URL rewrite to redirect only specific sub site documents and it should not redirect other sub site (OR) root site documents (These are SharePoint sites).

Example: Redirect documents from 

https://test.abc.com/subsite1/Documents/mydocument.pdf?Web=1   document URL's tohttps://xyz.abc.com

And it should not redirect, if source url contains other sub site/root site document url's like below

https://test.abc.com/Documents/mydocument.pdf?Web=1  (OR)https://test.abc.com/subsite2/Documents/mydoc.pdf?Web=1

using below code in web config: this is not redirecting as expected with this pattern (pattern="^test.abc.com\/subsite1\/")


<rule name="subsite1 Redirection" stopProcessing="true">
<action type="Redirect" url="https://xyz.abc.com" appendQueryString="false" />
<conditions>
<add input="{HTTP_HOST}" pattern="^test.abc.com\/subsite1\/"/>
</conditions>
<match url="\.(pdf|txt|xls|doc|ppt|xlsx|docx|pptx)" />
</rule>


Python Flask App Stuck in Waiting for localhost

$
0
0

I'm trying to run a flask app on a Server 2016 machine with IIS v10 and the httpplatformhander, here's my web.config:

<?xml version="1.0" encoding="utf-8"?><configuration><system.webServer><handlers><add name="PythonHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" /></handlers><httpPlatform processPath="C:\ProgramData\Anaconda3\python.exe" 
                  arguments="C:\Users\test\Documents\test_app\application.py" 
                  stdoutLogEnabled="true" 
                  stdoutLogFile="C:\Users\test\Documents\test_app\logs\acp.log" 
                  startupTimeLimit="60" 
                  processesPerApplication="16"><environmentVariables><environmentVariable name="SERVER_PORT" value="%HTTP_PLATFORM_PORT%" /></environmentVariables></httpPlatform></system.webServer></configuration>

When I run `python application.py` in cmd it correctly opens my 'Hello, World!' app, but I can't seem to get it to work through the httpPlatformHandler.  I added IIS_IUSRS to the security options for my test_app folder and the anaconda3 folder.  Is there a location where I can see more detailed logs for diagnostics?

How to start/stop a website in IIS using c++

$
0
0

I am using IIS 7.5 in windows 7 machine.

I need to start/stop websites from my C++ application. This is a plain win32 app, nothing to do with .NET.

Now, I've found out how to configure websites, using the IAppHostAdministration interfaces as mentioned in the linkhttps://forums.iis.net/t/1146649.aspx, but I can't find a way to start/stop those websites.


Please help me.

The FastCGI Process Exited Unexpectedly

$
0
0

Hi,

I have a Windows Server 2016 running under Azure and have installed PHP 7.1 in c:\php with php.ini running therein.  I created a PHP_FastCGI Handler mapping to c:\php\php-cgi.exe and am now at the point where I need to activate a custom plugin within Wordpress.  I ensure that IIS_USRS and Network Service have full control to c:\inetpub\wwwroot\wordpress.  My default document type is .php in IIS as well.

Upon activation of the Wordpress custom plugin, I received the error The FastCGI Process Exited Unexpectedly. 

What additional steps must be taken to ensure an error-free configuration?  Thanks for your help and guidance.

Redirecting subdomain to internal server

$
0
0

I've been searching and trying to get this working for the past couple hours and can't seem to find the right combination to make everything come together.  What I'm trying to do is rewrite https://sub.domain.com to an internal serverhttps://sub.internal.com:442 as well as rewrite http://sub.domain.com to http://sub.internal.com.  I don't know if this can be accomplished in one rule or if I need two rules.

Any help is greatly appreciated!

Thanks

Josh

Call +1-866-501-0503 For HotMail Customer Service Number

HTTP to HTTPS Rewrite Issues with Exchange 2016

$
0
0

Hi Everyone,

I've got an Exchange 2016 server that I'm using for webmail access as well as hosting our website.  I have a rewrite rule to redirect http traffic to https. 

<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>

The rule works fine, however I'm running into issues with some of the services that run related to Exchange.  Powershell scripts connecting to exchange don't work and some other items I noticed in the log files.  I've posted some snippets from the logs below.  I guess my question, is there any modifications or tweaks to the rewrite rule that can be done that won't affect Exchange?  The only option I can think of is to create a separate site in IIS to move the regular website to and leave the default website with Exchange. 

2020-01-06 00:00:15 192.168.1.37 GET /powershell ping=probe&CorrelationID=<empty>; 443 - 192.168.1.37 - - 401 111 0 13

2020-01-06 00:00:25 127.0.0.1 GET /PowerShell/ &CorrelationID=<empty>; 443 - 127.0.0.1 AMProbe/Local/ClientAccess - 401 111 0 15

2020-01-06 23:59:58 fe80::5ddd:2033:9069:dd92%6 RPC_IN_DATA /rpc/rpcproxy.dll 45c1e908-7e0c-45fe-8022-8c37565c241d@domain.com:6001&CorrelationID=<empty>;&RequestId=ff81bd3b-231a-43da-90de-689d467a0755&cafeReqId=ff81bd3b-231a-43da-90de-689d467a0755; 443 - fe80::5ddd:2033:9069:dd92%6 MSRPC - 401 1 2148074254 1

2020-01-06 23:59:58 fe80::5ddd:2033:9069:dd92%6 RPC_OUT_DATA /rpc/rpcproxy.dll 45c1e908-7e0c-45fe-8022-8c37565c241d@domain.com:6001&CorrelationID=<empty>;&RequestId=68615a29-35b5-464f-b7e0-aa2261c1f380&cafeReqId=68615a29-35b5-464f-b7e0-aa2261c1f380; 443 - fe80::5ddd:2033:9069:dd92%6 MSRPC - 401 1 2148074254 0

Any suggestions or thoughts on other options?

Thanks in advance!

Josh

IIS 8 Fault offset: 0x000096b1

$
0
0

I'm running a small setup and in the past week my app pools keep crashing. This is one of many nearly identical logs:

Faulting application name: w3wp.exe, version: 8.5.9600.16384, time stamp: 0x52157ba0
Faulting module name: HcApi.dll, version: 8.0.0.4444, time stamp: 0x59b6f63d
Exception code: 0xc0000005
Fault offset: 0x000096b1
Faulting process id: 0x175c
Faulting application start time: 0x01d5d2ece7c248b2
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Program Files (x86)\McAfee\Host Intrusion Prevention\HcApi.dll
Report Id: 25acd196-3ee0-11ea-8113-005056931e21
Faulting package full name:
Faulting package-relative application ID:

The exception code 0xc0000005 is pretty common and I've found all sorts of suggestions that it has to do with folder permissions. The user running my IIS app pools (and McAfee) is an admin.

What's throwing me off though is the Fault offset: 0x000096b1. I can't find that with Google. What does that Fault Offset mean?


Can't access site from outside

$
0
0

I created a site with IIS 8.5, let's say it's my.mycompany.pt. I also created na internal alias for the site (via internal IP). The creation of the site was last week.

However, even though I can access my site internally (via internal IP), I can't access it with my.mycompany.pt. Google Chrome gives the error DNS_PROBE_FINISHED_NXDOMAIN.

So, it seems that the DNS are still unaware of my site.

Is there any site configuration (in IIS) that I should change to make my site public? Or, must I contact somebody to publicize my site to DNSs?

rewrite causing 500 errors

$
0
0

IIS 10, Windows 2K16, URL Rewrite 2.1.  The server has about 6 sites on it, 2 of which us rewrite rules.  Site #1 ran fine with it's rewrite rules until about 2 weeks ago when it would start go give random 500 errors.  We enabled failed request tracing which shows the error below.  When we disable the rules and access the URL directly, the error goes away, which is what we did on site #1.  #2 is our API and is a bit more complex to just eliminate the rules from.  The rewrite rules look like this:

<div style="color: #d4d4d4; background-color: #1e1e1e; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 15px; line-height: 20px; white-space: pre;"> <div><httpErrors existingResponse="PassThrough" /></div><div>        <rewrite></div> <div>            <rules></div><div>                <rule name="ApiWithControllerAndId" stopProcessing="true"></div><div>                    <match url="^([^/]+)/([^/]+)/([^/]+)/?$" /></div><div>                    <conditions></div> <div>                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /></div><div>                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /></div><div>                    </conditions></div> <div>                    <action type="Rewrite" url="index.cfm?controller={R:1}&amp;method={R:2}&amp;id={R:3}" /></div><div>                </rule></div> <div>                <rule name="ApiWithController" stopProcessing="true"></div><div>                    <match url="^([^/]+)/([^/]+)/?$" /></div><div>                    <conditions></div> <div>                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /></div><div>                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /></div><div>                    </conditions></div> <div>                    <action type="Rewrite" url="index.cfm?controller={R:1}&amp;method={R:2}" /></div><div>                </rule></div> <div>            </rules></div><div>        </rewrite></div> </div>

All other sites that do not use rewrite in URL rewrite (we have some redirct rules but they're not effected) work fine.  The API site also works fine on a different, identical server.  At this point I'm out of ideas as to where to even look.  Tomcat indicates an IIS issue, IIS support people say it's a Tomcat issue etc.

<div class="content-container"> <div class="hidden" id="section_detail" style="display: block;">
<div id="section_detail_52_details">
FilterNameD:\ColdFusion2018\config\wsconfig\1\isapi_redirect.dll
</div>
<div class="duration">0 ms</div>53. -FILTER_END<div id="section_detail_53_details">
NotificationStatusSF_STATUS_REQ_ERROR
</div>
<div class="duration">0 ms</div> <div class="severity-error">Error</div>54. -FILTER_ERROR<div id="section_detail_54_details">
ErrorCodeIncorrect function. (0x1)
</div>
<div class="duration">0 ms</div> <div class="severity-informational">Informational</div>55. -FILTER_AUTH_COMPLETE_END<div id="section_detail_55_details">
</div>
<div class="duration">0 ms</div> <div class="severity-warning">Warning</div>56. -MODULE_SET_RESPONSE_ERROR_STATUS<div id="section_detail_56_details">
ModuleNameIsapiFilterModule
NotificationAUTHENTICATE_REQUEST
HttpStatus500
HttpReasonInternal Server Error
HttpSubStatus0
ErrorCodeIncorrect function. (0x80070001)
ConfigExceptionInfo
</div>
<div class="duration">0 ms</div> <div class="severity-verbose">Verbose</div>57. -NOTIFY_MODULE_END<div id="section_detail_57_details">
ModuleNameIsapiFilterModule
NotificationAUTHENTICATE_REQUEST
fIsPostNotificationEventtrue
NotificationStatus

NOTIFICATION_FINISH_REQUEST

</div>
</div> </div>

PHP 7.4 feedback

$
0
0

Hi Eric,

I don't know why you ask for feedback, but then lock the thread, so nobody can reply to you.

Anyway, I've tested Wincache 2.0.0.8 with PHP 7.4 on a live-server (yes, I'm crazy laughing) for the past 21 hours with 30,000 page-hits and zero problems.

I use the session-cache, user-cache, and file-cache.

All on a Windows Server 2016, with PHP 7.4.2 x64 (NTS).

Thanks for the great work.

Cheers,

Mike

Academy oscar

CORS on asp.net core web api doesn't work after deploy on IIS

$
0
0

I'm developing a net core webapi with an angular front end and a custom BasicAuthenticationHandler. When i debugging (i debug using "Visual studio code" not "Visual studio") everything works fine, now that i had deploying the web abi on IIS I can't make it works, it gives me CORS error: "...No 'Access-Control-Allow-Origin' header is present on the requested resource."

Here is the code to enable CORS on web api:

public void ConfigureServices(IServiceCollection services)
{
...
    services.AddCors();

...
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
...
    app.UseCors(x => x
        .AllowAnyOrigin()
        .AllowAnyMethod()
        .AllowAnyHeader());

I use this guide for setting IIS website:

https://docs.microsoft.com/en-gb/aspnet/core/host-and-deploy/iis/index?view=aspnetcore-3.1

 i even create a controller method with 

[AllowAnonymous]

if I open the url thru browser, it gives me error 400, 401.1 if I use Postman, CORS error on angular app.

IIS 8.5 SSL binding is acting weird

$
0
0

Hi

I'm trying to add a new web api to our current test server (Windows Server 2012 R2 running IIS 8.5), but unfortunately something weird is going on and my limited knowledge of IIS is making it difficult to troubleshoot

The server has a lot of wcf services running, where all of them only has a http binding written like test-servicename.MyWebsiteAddress.com.

Then it has one website with a bit funny binding. There is the normal http and https binding written as test-app.MyWebsiteAddress.com and then it has a https binding where host name field is completely empty and the port 44301 (so not the standard https port as far as I can tell). What this empty one does I'm not sure, but I know that if I remove this one the website can't load (Firefox and Chrome just tells me the connection has timed out)

I have added my newly created web api as a new site and included a simple hello.html to the folder. If I only set up http binding for my api, then I can successfully call it from Postman. If I add https binding, then I will get a "404 - File or directory not found." error both when calling http and https.

I can open up the Hello.html file when using http, but not https

If I remove this empty binding from the website and move it to my web api site, then I can get my api working and open Hello.html both using http and https. Unfortunately this causes the web site from working

It seems like there is some hidden configuration regarding port 44301 and I was thinking that if I can do the same but for port 44302, then I might be able to get something working. Is there something specific about that port in IIS or did the previous developers set up something somewhere?

Web Dav - Allowing Additional Verbs

$
0
0

Microsoft Win Server 2012 R2

IIS 8.5

We have a simple website (using Default Web Site) on IIS 8.5

It is used to publish performance test results for an application. The end users have requested help enabling the PUT method on the website.

This is key to automate their testing activities as they want to store HTML Reports through automation.

So I followed the steps below:

1. IIS Manager.

2. Clicked on Default Web Site

3. Go to "Handler Mappings".

4. In the feature list, double clicked on "WebDAV".

5. Clicked  on "Request Restrictions".

6 .In the tab "Verbs" selected "All verbs" .

So this did not work, I started to get errors even navigating to the web site.

So then in Handler Mappings I removed WebDav and now the website is at least up again.

So I wanted to make another attempt today. I can see in Server Management that WebDav role is definitely still installed. But it no longer appears in the list of Handler Mappings.

Can someone please help?


IIS replacing multiple forward slashes in a URL

$
0
0

We are using IIS version 10. An application uses multiple forward slashes in it's relative URI for the file location. Example:

/alfresco/service/wps/mail/integration/rename/workspace://SpacesStore/5fbc83ec?alf_ticket=TICKET_1234.

The IIS combines multiple forward slashes into a single forward slash when matching URI to file location.

However, this breaks the address of the file location in the application.

Is there a way to stop IIS from combining multiple forward slashes into a single one?

Many thanks

FTP SPEEDS

$
0
0

Good morning reader. I have set up a basic window 10 FTP on my home desktop, which is functioning for all intensive purposes correctly. However upon transferring a somewhat large file (6gbs) to a colleague last night the download eventually failed. With what i can only assume was a timeout issue or something. Since the download was crawling at a dismal 1mbs, we both have good connection speeds above 300mb/s with uploads above 15mb/s.

Is there anyway in IIS to allow for faster download / upload speeds? There is no 3rd party software being used, my colleague connects via theFTP://ip in a browser of their choosing with basic authentication user / pass, no SSL. During sessions all firewalls are turned off.

How do you create ARR URL rewrite conditions via powershell

$
0
0

I'm trying to write a script that will create our ARR redirect for us when we supply a sitename.  It works for the most part but instead of adding a condition to an existing rule, it wipes out the conditions and only lists the one I just added.  There has to be a way to add a conditions to a rule without wiping out the other conditions.  Ideally I would like to be able to supply a site url and it will be added to the list of other URLs in the condition list and set it to "match any" for those conditions.

Here is my code.  

$sitename = "Site7"$name = "'ARR Rule'"$URL = ".domain.com"$site = 'IIS:\Sites\Default Web Site'

Set-WebConfigurationProperty -PSPath $site -filter "system.webServer/rewrite/rules/rule[@name=$name]/conditions" -name '.' -value @{input='{HTTP_HOST}'; matchType='0'; pattern=$sitename+$URL; ignoreCase='True'; negate='False'};

[Pre-Release] WinCache for PHP 7.3 and PHP 7.4alpha1

$
0
0

I would greatly appreciate your help in validating a potential release candidate of WinCache for PHP 7.3:

 

x86: https://sourceforge.net/projects/wincache/files/development/wincache-2.0.0.8-dev-7.3-nts-vc15-x86.exe 

x64: https://sourceforge.net/projects/wincache/files/development/wincache-2.0.0.8-dev-7.3-nts-vc15-x64.exe 

 

I have simply dealt with the compilation errors introduced by moving to PHP 7.3 / Zend 3.3.0 internals.  There have been no functional changes.

 

I have run the PHP regression test suite with WinCache enabled and disabled, and nothing crashes instantly.  If you do find a reproduceable crash, please send me a code example that triggers the crash, so I can investigate.

If no issues are reported with this build, I will proceed with releasing this extension via Web Platform Installer by June 28th, 2019.

 

 

Additionally, I have a release candidate of WinCache for PHP 7.4.0alpha1:

 

x86: https://sourceforge.net/projects/wincache/files/development/wincache-2.0.0.8-dev-7.4.0alpha1-nts-vs16-x86.exe

x64: https://sourceforge.net/projects/wincache/files/development/wincache-2.0.0.8-dev-7.4.0alpha1-nts-vs16-x64.exe

 

Same deal goes for these bits as well.  If you find something, let me know. 

 

I will not create a Web Platform Installer package for WinCache for PHP 7.4 until PHP 7.4 completes its Beta cycle and is released.

 

My apologies for the delay in WinCache for PHP 7.3.

 

Thank you!

    --E.


Edit: If you downloaded the 7.4apha1 WinCache bits before 2019-06-17 23:00 UTC, and you're getting an error like:

PHP Warning:  PHP Startup: Can't load module 'C:\Program Files\PHP\v7.4\ext\php_wincache.dll' as it's linked with 14.21, but the core is linked with 14.20 in Unknown on line 0

This has been fixed with a new package.  The file name and version is the same, so you'll have to re-download & extract.

Thank you to Jan Ehrhardt over at  www.apachelounge.com for pointing this out!

Write file created date

$
0
0

Hi, I am using Windows powershell 5 and trying to write the file created date using Write-Host in the code below. When I execute the script I get "File date: $file.CreationTime.Date" but not the file created date. Could you please guide me.

$file = "<path of file>"
if($file = Get-Item $file -ErrorAction 0){
	if($file.CreationTime.Date -ne [datetime]::Today) {
		Send-MailMessage -SmtpServer <String> -Subject <String> -From <String> -To <String>
		Write-Host 'File date: $file.CreationTime.Date'
	}else{
		Write-Host 'File date: $file.CreationTime.Date'
    }
}

Thank you.

Viewing all 27852 articles
Browse latest View live


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