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

Unrecognized element 'rewrite'

$
0
0

Hello all, I'm a computer science student working as an intern and I've been tasked with figuring out why the http to https redirects aren't working for several sites at this company. Since 2/12 when I began the undertaking, I have successfully implemented the script contained in this article (under Method 1): https://www.sslshopper.com/iis7-redirect-http-to-https.html in 3 of the 7 sites. Those 3 sites are now working correctly. However the one I'm working on now has a web.config file that is very different from the others and when I try to add the rewrite element I get a 500.19, error code: 0x8007000d Config error: Unrecognized element 'rewrite'. I've been working on this project part time for the last 9 days and have a foggy understanding of what is taking place, but if there is anyone here who could help shed some light on things I would be much obliged. Included is the code from the problematic config file (with sensitive names replaced with generic ones). Thank you in advance for your time and sorry if this question has already been asked and an answer given. I'm really posting this Thread as a last resort.

Edit: I have verified that RedirectModule is installed (open IIS > select server > double click Modules in IIS section > Rewrite module is apparently there (Code: %SystemRoot%\system32\inetsrv\rewrite.dll). I'm running IIS 7 on Windows 2008 R2 I believe.

<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<configSections>
<section name="OurCompanyConfig" type="OurCompany.Core.Infrastructure.OurCompanyConfig, OurCompany.Core" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<OurCompanyConfig>
<Engine Type="OurCompany.Web.Infrastructure.OurCompanyMvcEngine, OurCompany.Web" />
</OurCompanyConfig>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<connectionStrings>
<add name="OurCompany" connectionString="Data Source=nmrxfs.ad.CompanyName.com;Initial Catalog=OurCompany_MOW;Integrated Security=True;User ID=OurCompanyweb;Password=pw;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" />
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="30" />
</authentication>
<customErrors mode="RemoteOnly" defaultRedirect="~/Error">
<error statusCode="404" redirect="~/Error/NotFound" />
<error statusCode="500" redirect="~/Error" />
</customErrors>
<httpModules></httpModules>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MiniProfiler" publicKeyToken="b44f9351044011a3" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.2.0.157" newVersion="3.2.0.157" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
</compilers>
</system.codedom>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<!-- rewrite added 2/19/18 to force redirect to https -->
<!--<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite> -->

<remove name="WebDAVModule" />
<add name="BundleModule" type="System.Web.Optimization.BundleModule" />
</modules>
<handlers>
<remove name="WebDAV" />
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
<!--ProjectGuid: 22D92156-2D9B-40F9-90DF-6DCF56E99396-->


Upload size limit

$
0
0

Hello,

I can not configure IIS 8 to accept uploading files larger than 4MB.
Can you help me ?

Thank you

FTP user isolation problems - 530 Error

$
0
0

Hi

Hoping someone can help me.

I am using Windows Server 2016 and IIS 10.

I have set up a FTP site which works fine as long as I have no isolation with the user starting in "user name directory" or "FTP root". However when I select user isolation "User name directory (Disable global virtual directories)" I get a 530 error and cannot log in.

I have set up the LocalUser directory in my FTP root directory with sub directories for my users. All the folder permissions are set.

I am using Basic authentication with no SSL and I am not on a domain.

I have also found that if I create a localusers/public directory I can login as anonymous if I enable anonymous authentication.

The FTP site is almost working and I am sure I am just missing something small to get the user isolation to work correctly.

Any help would be appreciated.

Many thanks Dave

Pascal's Triangle Snippet

$
0
0

Description: Invoke pascalRow(), and pass it some int value. Examples:
pascalRow(3);
pascalRow(5);Returns the nth row of Pascal's Triangle

Created using txeditor

/**
 * 
 * @param row The ith row of the Pascal Triangle
 * @return ArrayList<Integer> A List containing all the binomial coefficients
 *         for the given row
 */   
public ArrayList<Integer> pascalRow(int row){
    ArrayList<Integer> values = new ArrayList<Integer>();
    for(int i = 0; i <= row; i++){
        values.add(choose(row, i));
    }
    return values;

}

/**
 * 
 * @param n The number of total elements
 * @param r The number to choose from n
 * @return The binomial coefficient n!/(r! * (n-r)!)
 */
public int choose(int n, int r){
    return factorial(n)/(factorial(r) * factorial(n-r));
}

/**
 * 
 * @param n The number of which to take the factorial
 * @return int n!
 */
public int factorial(int n){
    int x = 1;
    
    for(int i = 2; i <= n; i++){
        x *= i;
    }
    return x;
}

IIS logs shows SQL injection entry

$
0
0

In one of our asp.net web application, we found a following entry in IIS log. 

2018-02-20 03:06:25 172.16.3.101 GET / _event_transid=1555077557&_event_clientip=117.212.38.55&_event_clientport=52372&_event_attackname=SQL+Injection&_event_threatcategory=Injections 80 - 117.212.38.55 AppWall 200 0 0 0

This happens randomly for a genuine URL request from the user. What is the reason for this entry.

How to get the ftp log directory by using appcmd ?

$
0
0

Hi all , 

I have used the following command to query the iis log's directory location.

appcmd list config /section:system.applicationHost/sites /text:siteDefaults.logfile.directory
%SystemDrive%\inetpub\logs\LogFiles

I was changed the ftp server default log to C:\inetpub\logs\FTPLogFiles directory.

How to using the appcmd command to query ftp server log's directory location ? 

Please help to me . 

thanks.

appcmd list site /text:*
SITE
SITE.NAME:"Default Web Site"
SITE.ID:"1"
bindings:"http/*:80:"
state:"Started"
[site]
name:"Default Web Site"
id:"1"
serverAutoStart:"true"
[bindings]
[binding]
protocol:"http"
bindingInformation:"*:80:"
sslFlags:"0"
[limits]
maxBandwidth:"4294967295"
maxConnections:"4294967295"
connectionTimeout:"00:02:00"
maxUrlSegments:"32"
[logFile]
logExtFileFlags:"Date, Time, ClientIP, UserName, ServerIP, Method, UriStem, UriQuery, HttpStatus, Win32Status, TimeTaken, ServerPort, UserAgent, Referer, HttpSubStatus"
customLogPluginClsid:""
logFormat:"W3C"
logTargetW3C:"File"
directory:"C:\inetpub\logs\LogFiles"
period:"Daily"
truncateSize:"20971520"
localTimeRollover:"false"
enabled:"true"
logSiteId:"true"
flushByEntryCountW3CLog:"0"
maxLogLineLength:"65536"
[customFields]
maxCustomFieldLength:"4096"
[traceFailedRequestsLogging]
enabled:"false"
directory:"C:\inetpub\logs\FailedReqLogFiles"
maxLogFiles:"50"
maxLogFileSizeKB:"1024"
customActionsEnabled:"false"
[applicationDefaults]
path:""
applicationPool:""
enabledProtocols:"http"
serviceAutoStartEnabled:"false"
serviceAutoStartProvider:""
preloadEnabled:"false"
[virtualDirectoryDefaults]
path:""
physicalPath:""
userName:""
password:""
logonMethod:"ClearText"
allowSubDirConfig:"true"
[ftpServer]
allowUTF8:"true"
serverAutoStart:"true"
[connections]
unauthenticatedTimeout:"30"
controlChannelTimeout:"120"
dataChannelTimeout:"30"
disableSocketPooling:"false"
serverListenBacklog:"60"
minBytesPerSecond:"240"
maxConnections:"4294967295"
resetOnMaxConnections:"false"
maxBandwidth:"4294967295"
[security]
[dataChannelSecurity]
matchClientAddressForPort:"true"
matchClientAddressForPasv:"true"
[commandFiltering]
maxCommandLine:"4096"
allowUnlisted:"true"
[ssl]
serverCertHash:""
serverCertStoreName:"MY"
ssl128:"false"
controlChannelPolicy:"SslRequire"
dataChannelPolicy:"SslRequire"
[sslClientCertificates]
clientCertificatePolicy:"CertIgnore"
useActiveDirectoryMapping:"false"
validationFlags:""
revocationFreshnessTime:"00:00:00"
revocationUrlRetrievalTimeout:"00:01:00"
[authentication]
[anonymousAuthentication]
enabled:"false"
userName:"IUSR"
password:""
defaultLogonDomain:"NT AUTHORITY"
logonMethod:"ClearText"
[basicAuthentication]
enabled:"false"
defaultLogonDomain:""
logonMethod:"ClearText"
[clientCertAuthentication]
enabled:"false"
[customAuthentication]
[providers]
[customAuthorization]
[provider]
name:""
enabled:"true"
[customFeatures]
[providers]
[messages]
exitMessage:""
greetingMessage:""
bannerMessage:""
maxClientsMessage:""
suppressDefaultBanner:"false"
allowLocalDetailedErrors:"true"
expandVariables:"false"
[fileHandling]
keepPartialUploads:"false"
allowReplaceOnRename:"false"
allowReadUploadsInProgress:"false"
[firewallSupport]
externalIp4Address:""
[userIsolation]
mode:"None"
[activeDirectory]
adUserName:""
adPassword:""
adCacheRefresh:"00:01:00"
[directoryBrowse]
showFlags:""
virtualDirectoryTimeout:"5"
[logFile]
logExtFileFlags:"Date, Time, ClientIP, UserName, ServerIP, Method, UriStem, FtpStatus, Win32Status, ServerPort, FtpSubStatus, Session, FullPath"
directory:"C:\inetpub\logs\FTPLogFiles"
period:"Daily"
truncateSize:"20971520"
localTimeRollover:"false"
enabled:"true"
selectiveLogging:"LogSuccessful, LogError, LogInfrastructure"

PoweShell Script execution hangs in Windows Server 2012R2 - found ntdll!ZwWaitForMultipleObjects

$
0
0

One of my script hangs during one of our product installation. Hangs is happening while executing some of the common PowerShell and native ExEs from PowerShell.

more details in below question which is actually in WindowsServer general Forums.

https://social.technet.microsoft.com/Forums/windowsserver/en-US/1cbab99f-d601-4ab5-9e8b-fc965c72eafd/oweshell-script-execution-hangs-in-windows-server-2012r2-found-ntdllzwwaitformultipleobjects?forum=winservergen

we use msdeploy,iisreset,appcmd here during web packages installation, this is another place where it hangs, but hang happens after successful execution of msdeploy.exe. I tried using latest available version of msdeploy, is still hangs some times.

We have around 7 web packages, hang happens after deploying a package as well as before deploying a package.

Code logic here.

Step 1: Test msdeploy exists, if not install it

Step 2 : iisreset (hangs here sometimes)

Step 3 : check if the app pool is available, if so Stop-WebAppPool (hangs here sometimes)

Step 4: install web package using msdeploy

Step 5: get the app pool state and start if it is not started - (some times hangs here)

Step 6: do some app pool settings using appcmd.exe (hangs some times after this execution)

Step 7: some other app pool settings like Set-ItemProperty IIS:\AppPools\$appPoolName -Name recycling.periodicRestart.memory -Value $appPoolRestartMemory

Step 8 : get the next package and go to Step 1

Sometimes, hang happens after executing

netsh http delete urlacl url=$url

Note: None of the hangs are consistent, each and every time, hang happens in either one place.

I did procdump analysis of the powershell process and ended up in ntdll!ZwWaitForMultipleObjectsroutine for all hangs.

same is being shown by the proc explorer threads view as well.


PFB the hanging handle's stack

ntdll.dll!ZwWaitForMultipleObjects+0xa
KERNELBASE.dll!WaitForMultipleObjectsEx+0xed
clr.dll!GetMetaDataPublicInterfaceFromInternal+0x3a95e
clr.dll!GetMetaDataPublicInterfaceFromInternal+0x3a7f8
clr.dll!GetMetaDataPublicInterfaceFromInternal+0x3a5f1
clr.dll!GetMetaDataPublicInterfaceFromInternal+0x3eeb5
[Managed to Unmanaged Transition]
mscorlib.dll!System.Threading.WaitHandle.InternalWaitOne+0x21
mscorlib.dll!System.Threading.WaitHandle.WaitOne+0x31
System.Management.Automation.dll!System.Management.Automation.Runspaces.PipelineBase.Invoke+0x34
Microsoft.PowerShell.ConsoleHost.dll!Microsoft.PowerShell.Executor.ExecuteCommandHelper+0x154
Microsoft.PowerShell.ConsoleHost.dll!Microsoft.PowerShell.ConsoleHost.DoRunspaceInitialization+0x7ed
Microsoft.PowerShell.ConsoleHost.dll!Microsoft.PowerShell.ConsoleHost.DoCreateRunspace+0x1d3
Microsoft.PowerShell.ConsoleHost.dll!Microsoft.PowerShell.ConsoleHost.CreateRunspace+0x49
Microsoft.PowerShell.ConsoleHost.dll!Microsoft.PowerShell.ConsoleHost.DoRunspaceLoop+0xc3
Microsoft.PowerShell.ConsoleHost.dll!Microsoft.PowerShell.ConsoleHost.Run+0x14c
Microsoft.PowerShell.ConsoleHost.dll!Microsoft.PowerShell.ConsoleHost.Start+0x1aa
Microsoft.PowerShell.ConsoleHost.dll!Microsoft.PowerShell.UnmanagedPSEntry.Start+0x33c
[Unmanaged to Managed Transition]
clr.dll!DllCanUnloadNowInternal+0xbe3
clr.dll!DllCanUnloadNowInternal+0xaa3
clr.dll!GetMetaDataInternalInterfaceFromPublic+0x1abde
clr.dll!GetMetaDataInternalInterfaceFromPublic+0x1aa87
[Managed to Unmanaged Transition]
mscorlib.dll!System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal+0x80
mscorlib.dll!System.Reflection.RuntimeMethodInfo.Invoke+0x92
[Unmanaged to Managed Transition]
clr.dll!DllCanUnloadNowInternal+0xbe3
clr.dll!DllCanUnloadNowInternal+0xaa3
clr.dll!DllCanUnloadNowInternal+0x12f5
clr.dll!SetRuntimeInfo+0x20b4
clr.dll!SetRuntimeInfo+0x1c16
clr.dll!SetRuntimeInfo+0x253d
clr.dll!SetRuntimeInfo+0x2906
clr.dll!SetRuntimeInfo+0x276d
clr.dll!SetRuntimeInfo+0x26ae
powershell.exe+0x8663
powershell.exe+0x7c67
powershell.exe+0xa6cc
KERNEL32.DLL!BaseThreadInitThunk+0x22
ntdll.dll!RtlUserThreadStart+0x34

Any help is appreciated a TON.

Can't get IIS Authentication to work with Active Directory group

$
0
0

So I've been working on this for a few days, using so many google searches, reading so many posts and tutorials and websites that I'm pretty sure I've exhausted my capabilities for self-help.

I have the following setup:

  • IIS 10 on Windows Server 2012 (also Active Directory is on the same machine, this is a test VM)
  • Windows Authentication and URL Authentication installed
  • ISAPI Rewrite and ISAPI Extensions installed with Helicon's ISAPI Rewrite Filter (because IIS's URL Rewrite refuses to pass the authenticated username to my reverse proxied back-end)

I have 2 users setup for testing, one is part of a group called "Test IIS Access" and the other is just a normal user.

This is my web.config file in the folder: 

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><security><authorization><remove users="*" roles="" verbs="" /><add accessType="Allow" roles="EXAMPLE\Test IIS Access" /><add accessType="Deny" users="*" /></authorization></security></system.webServer></configuration>

I've even tried removing both the "remove" entry and the "add Deny" entry, and nothing changes. Any time I try to login to this page from IE on that local machine, it prompts for login, I enter example\testuser (the one with access) and it just prompts 3 times before showing the error 401.1. 

Any help troubleshooting this will be greatly appreciated.


Unable to install IIS on Windows 10

$
0
0

I upgraded my Windows 8 machine to Windows 10 recently. I did not have IIS installed at the time (though I've installed it with ease on other machines in the past). I was hoping it would once again be easy, but something seems wrong with Windows 10 and IIS.

I went to Control Panel > Programs > Turn Windows features on or off. I ticked the box for Internet Information Services, and hit OK. The first time I tried this, everything looked like it was going well until it popped up some error dialog "An error has occurred. Not all of the features were successfully changed."

Can someone please help on this issue.

Thanks in Advance.

Creating IIS Site in powershell without SNI ( Multiple Certificates)

$
0
0

Hi All,

I am trying to create one IIS site in powershell .I want the site to be created without SNI.
I am using iis 10, ( Windows 2016 server )

Our Netscaler is not compatible with SNI and hence I have to create without SNI.

I am able to create site with SNI using sslflags=1. But When I try to create without sni, I am running into issues.

Below is my snippet

$SecurePassword = ConvertTo-SecureString "Somepassword" -AsPlainText -Force;
Import-PfxCertificate -FilePath 'C:\certs\nt111trnch01.pfx' -CertStoreLocation Cert:\LocalMachine\My -Password $SecurePassword;
Import-PfxCertificate -FilePath 'C:\certs\nt111trnch02.pfx' -CertStoreLocation Cert:\LocalMachine\My -Password $SecurePassword;
Import-PfxCertificate -FilePath 'C:\certs\nt111trnch03.pfx' -CertStoreLocation Cert:\LocalMachine\My -Password $SecurePassword;
Import-Module "WebAdministration";
New-Item IIS:\Sites\myProj -bindings @{protocol='https';bindingInformation='*:8080:nt111trnch01.sit.abcit';SslFlags=1} -PhysicalPath C:\site;
New-WebBinding -Name "myProj" -Protocol https -HostHeader nt111trnch02.sit.abcit -Port 8080 -SslFlags 1; \
New-WebBinding -Name "myProj" -Protocol https -HostHeader nt111trnch03.sit.abcit -Port 8080 -SslFlags 1; \
New-Item -Path "IIS:\SslBindings\*!8080!nt111trnch01.sit.abcit" -Thumbprint 145300EC69B3448EE15A54DBCD54647AF8294611 -SslFlags 1;
New-Item -Path "IIS:\SslBindings\*!8080!nt111trnch02.sit.abcit" -Thumbprint 86C1CD3660F9810DB30CB2E312E197C898I26253 -SslFlags 1;
New-Item -Path "IIS:\SslBindings\*!8080!nt111trnch03.sit.abcit" -Thumbprint 0C7888C0615615997DB6F9DA9E9A03E4671E3BAD -SslFlags 1;
New-Item C:\site\myProj -type directory

Note: I am able to create site with single certificate and without SNI. But binding multiple certificates causing the issues.

When I changed all SslFlags vlaue to 0, I am getting this error.

New-Item : Cannot create a file when that file already exists
At line:12 char:2
+     New-Item -Path "IIS:\SslBindings\*!8080!nt111trnch02.sit.abci...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-Item], Win32Exception
    + FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.NewItemCommand

WARNING: Binding host name 'nt111trnch03.sit.abcit' is not equals to certificate subject name 'CN=nt111trnch03.sit.swcsit, OU=IT Services, O=Mycity 
Company, L=Mycity, S=State, C=Country'. Client may not be able to connect to the site using HTTPS protocol.
New-Item : Cannot create a file when that file already exists
At line:13 char:2
+     New-Item -Path "IIS:\SslBindings\*!8080!nt111trnch03.sit.abci ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-Item], Win32Exception
    + FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.NewItemCommand

Site with multiple certificates

Thanks in advance

VVP

A New IIS Site on 3 servers with SSL Binding

$
0
0

Hi All,

I am starting with IIS. Sorry if this question sounds silly.

We have to deploy a site to IIS and requirement is to load balance on 3 servers and bind ssl sertificates

So what is the approach we have to take.

Lets assume server A, server B and server C . 

I have 3 SSL certificates issued: serverA.domain.net,serverB.domain.net,serverC.domain.net

I have copied the website to C:\site folder on all three servers.

in server A, I clicked on IIS UI and then create new site, enter physical path as C:\site.

Now in binding section, In server A should I bind only ssl certificate named serverA.domain.net or should I bind all 3.

Please let me know.

Thanks in advance.

VVP

Setting up SPNs for multiple application pool identities under same FQDN

$
0
0

Server FQDN: IIS01.domain.com

Website binding: mysite.domain.com

Applications:

mysite.domain.com/myApp1 running under application pool configured with user domain\User1

mysite.domain.com/myApp2 running under application pool configured with user domain\User2

What SPNs do I need to register for these applications to work with kerberos authentication?

Problem characters with accents in URL

$
0
0

Characters with accents in URL

When executing the request "localhost/test/não"
I receive in my application isapi hosted in iis the value "n�o"

But when I make the same request for the same application but it is not hosted on iis, I get the correct value "não"

Somehow the iis server does this with my "ã" character and passes to my application in this way "�"

I read many posts about this:
   I configured globalization requests from .net to iso-8859-1 and also to utf-8 as indicated in some posts, but to no avail.
  
I do not know what else to do, at what point is the conversion of the character "ã" performed? Where do I set up to correctly accept these characters?
"ã" "ç" "õ"

Testing machine
   Windows7 Ultimate
   IIS (Version 7.5.7600.16385)

Production machine
   Windows Server 2012 R2
   IIS (Version 8.5.9600.16384)

Application developed in Delphi

One to one mapping encryption password on multiple servers

$
0
0

Hi guys,

I have set up one to one mapping authentication on my production web server. My certificate is mapped with a domain account: when I write the password, it be encrypted in web.config file of my application.

It works well but if I deploy my application on my other web servers to balance it, the password doesn't work because cannot be decrypted (I have a 401 error). I think that it's encrypted with some id of my primary web server

How I can use the same password on all servers? It's not possibile for me set password on each iis because when I deploy my application I upload it in one location, then I copy it on all servers with powershell then web.config must be identical

Thanks in advance

Jack

Failed- Forbidden for Git Bash download

$
0
0

I am getting following error for Git Bash download

<div class="header">This XML file does not appear to have any style information associated with it. The document tree is shown below.</div> <div class="pretty-print"> <div class="collapsible" id="collapsible0"> <div class="expanded"> <div class="line"><Error></div><div class="collapsible-content"> <div class="line"><Code>AccessDenied</Code></div> <div class="line"><Message>Request has expired</Message></div> <div class="line"><X-Amz-Expires>300</X-Amz-Expires></div> <div class="line"><Expires>2018-02-24T05:17:23Z</Expires></div><div class="line"><ServerTime>2018-02-24T05:41:24Z</ServerTime></div> <div class="line"><RequestId>BCA465A165216433</RequestId></div><div class="collapsible" id="collapsible1"> <div class="expanded"> <div class="line"><HostId></div> <div class="collapsible-content">s1lw/Hbu2GIAoiSCsXhUg7hjJ9Xt2SX058+ArXJmr2+SfZ6wzzAl5zOeWG4jnrP/5O7XKu2Wk7Q=</div><div class="line"></HostId></div> </div> </div> </div> <div class="line"></Error></div> <div class="line"></div> <div class="line">Please help</div></div> </div> </div>

Url rewriting gives me HTTP 404 Not Found

$
0
0

Hi,

I have created a new Virtual Directory(Virtual application) under the Default site. And using URL Rewrite functionality to rewrite a URL. But it gives me HTTP 404 Not Found error .

The web.config file is correct ,as when using the same in a different server 2 machine it works fine. Is there something which I am missing at the IIS level setting for it to work.

I have installed WebFarm and ARR2.5 along with URL 2.0 . Post installation is there any specific settings required at the IIS level for the URL rewrite to work.

I have added the Mapping entry under the Rule for rewrite map for URL Rewrite. Also enabled the Proxy at the ARR.

Please give some suggestions.

Cannot install Wordpress/PHP through Microsoft Web PI

$
0
0

Hi everyone! I'm having a hard time trying to install Wordpress in an AWS windows 12 server R2. I already added the mySQL RDS from the EC2 panel.

The error I see when trying to install via Web PI, It is showing that a pre-required component is needed in order to install PHP. I tried installing one by one and they all report the same issue. Screenshot below.

Do you happen to know what could be happening? The server is new, haven't touch much, and all these tools at these days are supposed to work pretty automatic, but that's not the case. Any idea what I am missing?

Any help will be much appreciated,

Thank you!

Best,

Juan

Microsfot web PI err

301 redirect asp to aspx in webconfig - negate certain pages that have query strings

$
0
0

I Have a redirect rule in my web.config file that redirects all .asp pages to .aspx. However, there are a few url's with .asp extensions that I do not want to redirect.

These urls are displayed like this in the browser address bar.

https://www.example.com/seriesdisplay.asp?cat=DR3&class=50

I attempted to use the following rule below. It works in not redirecting the seriesdisplay.asp page itself, but any pages the contain the two query strings, it still redirects.

How can I not redirect all the seriesdisplay.asp pages that also contain query strings?

<rulename="Redirect-asp-aspx-IIS-new"><matchurl="(.*?)asp$"ignoreCase="true"/><conditions><addinput="{REQUEST_URI}"negate="true"pattern="^/seriesdisplay\.asp$"ignoreCase="true"/></conditions><actiontype="Redirect"url="{R:0}x"redirectType="Permanent"/></rule>

IIS Https Site Stop Responding on Server 2016

$
0
0

Hi.

I have a website hosted on Windows Server 2016 at Google Cloud.

Some days ago the website stopping responding sometimes and I need to reboot the server to it work again.

I dont find anything helpfull on Logs.

What exactly I need to do here?

Reboting IIS only don't solve the problem, or stopping and starting the website or even the Application Pools.

Appear that only the HTTPs version stops working, because the HTTP still work when that happen. I have a URL Rewrite rule to redirect all content to HTTPs version. So if I disable this rule when HTTPs version stop working and the HTTP version is still acessible.

When that happen I also noticed that if I try to change the SSL Certificate for the corresponding site IIS freezes and I need to close it on Task Manager.

After a server reboot everything back to normal, but this is happening a lot and I can't have my website down so many times.

Someone have some idea on what's going on and how to solve that? Ask me what info you need.

This is my website URL: www.papinho.com

URLRedirect is not working for queryString Variable

$
0
0

Team,

I need to create a common urlRedirect Rule for

http://www.campbellskitchen.com/recipes/recipedetails?RecipeID=10292&rewrite=true&crlt.pid=sp.IP6tltZD1MLF

destination

http://www.campbellskitchen.com/recipes/recipedetails?RecipeID=10292

here value of RecipeID is variable. means

http://www.campbellskitchen.com/recipes/recipedetails?RecipeID=<RecipeID Numeric Value>&rewrite=true&crlt.pid=sp.IP6tltZD1MLF

destination

http://www.campbellskitchen.com/recipes/recipedetails?RecipeID=<RecipeID Numeric Value>

I have created rule like


<rule name="recipes recipedetails RecipeID 10292" stopProcessing="true">
<match url="^recipes/recipedetails$" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{QUERY_STRING}" pattern="^RecipeID=[0-9]&amp;rewrite=true&amp;crlt.pid=sp.IP6tltZD1MLF$" />
</conditions>
<action type="Redirect" url="http://www.campbellskitchen.com/recipes/recipedetails?RecipeID={C:1}" appendQueryString="false" redirectType="Permanent" />
</rule>

Unfortunately it is not working and giving me error

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed

I also checked in IIS Log file. The entry is like as follows

2018-02-25 16:08:51 10.13.15.184 GET /recipes/recipedetails RecipeID=10292&rewrite=true&crlt.pid=sp.IP6tltZD1MLF 50124 - 10.13.3.35 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko 500 50 1413 780

Could you please help me?

Viewing all 27852 articles
Browse latest View live




Latest Images