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

Problems interacting with IIS PSDrive (Get-ChildItem, Set-Location, Join-Path)

$
0
0

Hello,

I'm trying to script some IIS configuration. Part of the script I'm writing does some stuff inside the PSDrive:

##############################################################################
## IIS Setup                                                                ##
##############################################################################
Import-Module WebAdministration
Write-Host Write-Host "Checking if IIS is running . . ."$iis = Get-WmiObject Win32_Service -ComputerName $computername -Filter "name='W3SVC'" # If IIS is running, delete the "www" local Web site if present. # The IIS: PSDrive is used to accomplish this. if($iis -and $iis.State -eq "Running") { Write-Host "IIS is running."$localsite = 'www1'$path = join-path -path IIS:\Sites -ChildPath $localsite if (test-path -path $path) {
# etc...

However, I get a NullReferenceException here because it can't find the 'IIS:\' part of the path.

I know that IIS is installed and running correctly, and that my module-import is successful (I can see IIS when I use Get-PSDrive:)

PS C:\> Get-PSDrive

Name           Used (GB)     Free (GB) Provider      Root                                               CurrentLocation
----           ---------     --------- --------      ----                                               ---------------
Alias                                  Alias
C                   8.96          0.00 FileSystem    C:\
Cert                                   Certificate   \
D                                      FileSystem    D:\
Env                                    Environment
HKCU                                   Registry      HKEY_CURRENT_USER
HKLM                                   Registry      HKEY_LOCAL_MACHINE
IIS                                    WebAdminis... \\CITLBLDEMO04
[...]

Plus, the error specifically says the path does not exist, not the drive. I've attempted commands before importing the module, and it complained that the drive itself didn't exist. So I'm pretty sure the drive's getting imported all right.

However, I can't use really any CmdLets with this PSDrive at all. Indeed, Get-ChildItem and Set-Location both fail:

PS C:\> Set-Location IIS:
Set-Location : Cannot find path 'IIS:\' because it does not exist.
At line:1 char:1+ Set-Location IIS:+ ~~~~~~~+ CategoryInfo          : ObjectNotFound: (IIS:\:String) [Set-Location], ItemNotFoundException+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

PS C:\> Get-ChildItem -Path IIS:\
Get-ChildItem : Cannot find path '\\CITLBLDEMO04\' because it does not exist.
At line:1 char:1+ Get-ChildItem -Path IIS:\+ ~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : ObjectNotFound: (\\CITLBLDEMO04\:String) [Get-ChildItem], ItemNotFoundException+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

I'm running Powershell v5.0 on Windows 10. On my Windows 7 machine with Powershell v4.0, this works just fine.

Thoughts?


Remote IIS administration

$
0
0

Hi all,

I want to delegate configuration of my freshly deployed IIS to a test user named John. I do not want John to use my local/domain admin accounts. In fact, I do not want him to RDP my server.

I know I can use Management Service to allow John admin sites, but I want to give him full control over the IIS server. I want him to use the 'Connect to a Server' feature of IIS manager instead of 'Connect to a Site/Application', but as stated, I do not want him to be a member of local administrators group or access server locally.

EDIT: I'm working on Server 2012R2/IIS 8.5

Is there a way to solve this scenario? Every search on the web gives me links to site delegation using Management Service

ERROR_USER_NOT_AUTHORIZED_FOR_DEPLOYMENTPROVIDER while performing deployment (web application or windows services) as NON-Admin user via MSDeploy

$
0
0

Hi Team,

We have been receiving error - "ERROR_USER_NOT_AUTHORIZED_FOR_DEPLOYMENTPROVIDER" while executing below command using MSDeploy as Non-admin user (Username : myserviceaccount) in Target server. Same error by-passed when admin access provided to "myserviceaccount" user in Target server.

Typically, reported error should not appear when we declare delegation rules in IIS as mentioned in http://www.iis.net/learn/publish/using-web-deploy/configure-the-web-deployment-handler. But, MSDeploy still requires Admin access to "userName" for complete preSync & postSync MSDeploy commands.

Also, Have followed all directions captured in below blogs to complete the deployment as Non-Admin user. But, no luck favors to us.

1. http://www.jamescrowley.co.uk/2011/09/05/deploying-windows-services-using-msdeploy/

2. https://support.microsoft.com/en-us/kb/2023855

3. http://www.iis.net/learn/publish/using-web-deploy/configure-the-web-deployment-handler

Can you advise us what we are missing here?

MSDeploy Command:

“C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe” -verb:sync -preSync:runCommand=’mypath\Uninstall_Service.cmd’,waitInterval=30000 -source:package=’mypackage.zip’ -dest:manifest=”mypackage.DestinationManifest.xml”,computerName=”https://myserver:8172/MSDeploy.axd?site=Default Web Site”,userName=”myserviceaccount”,password=”#########”,authtype=”Basic”,includeAcls=”False” -setParamFile:”mypackage.SetParameters.xml” -postSync:runCommand=’mypath\Install_Service.cmd’,waitInterval=30000 -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -allowUntrusted

Using IIS on a public facing website to present an internal web application

$
0
0

We have a new web based system that uses an Apache web server that talks to other servers and databases. The apache box was due to go in our DMZ and be public facing but due to security concerns (cannot go into the details) about the application architecture we are going to

a) put an addtitional server running IIS in our dmz.

b) This IIS server will redirect (https) traffic  though the firewall to the apache box.

i.e. the original application is available at https://apache.landomain.local/appname

The public will go to https://subdomain.mycompany.com - which maps to the server running IIS - this needs to pass traffic back and forth to  https://apache.landomain.local/appname . ie from the publics point of view they are just seeing the web application on the apache server.

Should we be using AAR for this ?

Would anyone be so kind to point me to the best documentation re how to configure IIS/AAR.

The IIS server will be running Windows 2012 R2.

Many thanks.

G

FIPS error running web deploy command line

$
0
0

Using web deploy 3.5 on 2008 and 2012 servers

when running the following web deploy command line which has worked in the past,

msdeploy -verb:sync  -source:metakey=lm/w3svc/2  -disableLink:ContentExtension -dest:archivedir=d:\backup\backup2,encryptPassword=MyPassword

now i get the following error: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms. The error does not allow the backup to complete.

I know that the FIPSalgorithmPolicy is recently enabled by group policy above us and cannot be disabled, so is there anyway to get around this error without changing the policy setting or disabling it in the registry. Can I change the algorithm that msdeploy uses or somehow just tell it in the command line to ignore the error and continue on

Newbie: Access folder from website?

$
0
0

Hi,

I have moved a website from IIS7 to 8.5. On one of the pages, there are a link so the user should be able to open a folder. The code looks like this on the page:

[file:\\\H:\proj\Marknad\Publ\text H:\proj\Marknad\Publ\text] 

It works fine on the old server, but nothing happens when I press the link on the new one. The folder is accessible locally.

Any ideas?

EDIT: going from win 2008R2 to Win 2012R2

Regards newbie

Hristo

How to alllow "PUT", "DELETE" method for IIS 10 on win 10?

IIS 10.0 Posh automation

$
0
0

Hi,

I am currently trying to automate installations of IIS 10 on server 2016 such as configurations of websites etc.  I have kind of hit a small bump on the road that confuse the heck out of me. I have understood that the IISAdministration module is new with IIS 10.0 so I have tried to use the cmdlets that comes with it as a base for my scripts.  However, it does not even contain half the amount of cmdlets that the WebAdministration module does.  It seems kind of unfinished e.g. cmdlet 'Export-IISConfiguration' seems to lack an equievlent cmdlet for importing the configuration.  'Get-IISSite' does not seem to give you 'live' results but 'Get-Website' does.

PS C:\Windows\system32> Get-Command -Module IISAdministration | Sort-Object

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Clear-IISCentralCertProvider                       1.0.0.0    IISAdministration
Cmdlet          Clear-IISConfigCollection                          1.0.0.0    IISAdministration
Cmdlet          Disable-IISCentralCertProvider                     1.0.0.0    IISAdministration
Cmdlet          Disable-IISSharedConfig                            1.0.0.0    IISAdministration
Cmdlet          Enable-IISCentralCertProvider                      1.0.0.0    IISAdministration
Cmdlet          Enable-IISSharedConfig                             1.0.0.0    IISAdministration
Cmdlet          Export-IISConfiguration                            1.0.0.0    IISAdministration
Cmdlet          Get-IISAppPool                                     1.0.0.0    IISAdministration
Cmdlet          Get-IISCentralCertProvider                         1.0.0.0    IISAdministration
Cmdlet          Get-IISConfigAttributeValue                        1.0.0.0    IISAdministration
Cmdlet          Get-IISConfigCollection                            1.0.0.0    IISAdministration
Cmdlet          Get-IISConfigCollectionElement                     1.0.0.0    IISAdministration
Cmdlet          Get-IISConfigElement                               1.0.0.0    IISAdministration
Cmdlet          Get-IISConfigSection                               1.0.0.0    IISAdministration
Cmdlet          Get-IISServerManager                               1.0.0.0    IISAdministration
Cmdlet          Get-IISSharedConfig                                1.0.0.0    IISAdministration
Cmdlet          Get-IISSite                                        1.0.0.0    IISAdministration
Cmdlet          New-IISConfigCollectionElement                     1.0.0.0    IISAdministration
Cmdlet          New-IISSite                                        1.0.0.0    IISAdministration
Cmdlet          Remove-IISConfigAttribute                          1.0.0.0    IISAdministration
Cmdlet          Remove-IISConfigCollectionElement                  1.0.0.0    IISAdministration
Cmdlet          Remove-IISConfigElement                            1.0.0.0    IISAdministration
Cmdlet          Remove-IISSite                                     1.0.0.0    IISAdministration
Cmdlet          Reset-IISServerManager                             1.0.0.0    IISAdministration
Cmdlet          Set-IISCentralCertProvider                         1.0.0.0    IISAdministration
Cmdlet          Set-IISCentralCertProviderCredential               1.0.0.0    IISAdministration
Cmdlet          Set-IISConfigAttributeValue                        1.0.0.0    IISAdministration
Cmdlet          Start-IISCommitDelay                               1.0.0.0    IISAdministration
Cmdlet          Start-IISSite                                      1.0.0.0    IISAdministration
Cmdlet          Stop-IISCommitDelay                                1.0.0.0    IISAdministration
Cmdlet          Stop-IISSite                                       1.0.0.0    IISAdministration
PS C:\Windows\system32> Get-Command -Module WebAdministration | Sort-Object

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Add-WebConfiguration                               1.0.0.0    WebAdministration
Cmdlet          Add-WebConfigurationLock                           1.0.0.0    WebAdministration
Cmdlet          Add-WebConfigurationProperty                       1.0.0.0    WebAdministration
Cmdlet          Backup-WebConfiguration                            1.0.0.0    WebAdministration
Cmdlet          Clear-WebCentralCertProvider                       1.0.0.0    WebAdministration
Cmdlet          Clear-WebConfiguration                             1.0.0.0    WebAdministration
Cmdlet          Clear-WebRequestTracingSetting                     1.0.0.0    WebAdministration
Cmdlet          Clear-WebRequestTracingSettings                    1.0.0.0    WebAdministration
Cmdlet          ConvertTo-WebApplication                           1.0.0.0    WebAdministration
Cmdlet          Disable-WebCentralCertProvider                     1.0.0.0    WebAdministration
Cmdlet          Disable-WebGlobalModule                            1.0.0.0    WebAdministration
Cmdlet          Disable-WebRequestTracing                          1.0.0.0    WebAdministration
Cmdlet          Enable-WebCentralCertProvider                      1.0.0.0    WebAdministration
Cmdlet          Enable-WebGlobalModule                             1.0.0.0    WebAdministration
Cmdlet          Enable-WebRequestTracing                           1.0.0.0    WebAdministration
Cmdlet          Get-WebAppDomain                                   1.0.0.0    WebAdministration
Cmdlet          Get-WebApplication                                 1.0.0.0    WebAdministration
Cmdlet          Get-WebAppPoolState                                1.0.0.0    WebAdministration
Cmdlet          Get-WebBinding                                     1.0.0.0    WebAdministration
Cmdlet          Get-WebCentralCertProvider                         1.0.0.0    WebAdministration
Cmdlet          Get-WebConfigFile                                  1.0.0.0    WebAdministration
Cmdlet          Get-WebConfiguration                               1.0.0.0    WebAdministration
Cmdlet          Get-WebConfigurationBackup                         1.0.0.0    WebAdministration
Cmdlet          Get-WebConfigurationLocation                       1.0.0.0    WebAdministration
Cmdlet          Get-WebConfigurationLock                           1.0.0.0    WebAdministration
Cmdlet          Get-WebConfigurationProperty                       1.0.0.0    WebAdministration
Cmdlet          Get-WebFilePath                                    1.0.0.0    WebAdministration
Cmdlet          Get-WebGlobalModule                                1.0.0.0    WebAdministration
Cmdlet          Get-WebHandler                                     1.0.0.0    WebAdministration
Cmdlet          Get-WebItemState                                   1.0.0.0    WebAdministration
Cmdlet          Get-WebManagedModule                               1.0.0.0    WebAdministration
Cmdlet          Get-WebRequest                                     1.0.0.0    WebAdministration
Cmdlet          Get-Website                                        1.0.0.0    WebAdministration
Cmdlet          Get-WebsiteState                                   1.0.0.0    WebAdministration
Cmdlet          Get-WebURL                                         1.0.0.0    WebAdministration
Cmdlet          Get-WebVirtualDirectory                            1.0.0.0    WebAdministration
Function        IIS:                                               1.0.0.0    WebAdministration
Cmdlet          New-WebApplication                                 1.0.0.0    WebAdministration
Cmdlet          New-WebAppPool                                     1.0.0.0    WebAdministration
Cmdlet          New-WebBinding                                     1.0.0.0    WebAdministration
Cmdlet          New-WebFtpSite                                     1.0.0.0    WebAdministration
Cmdlet          New-WebGlobalModule                                1.0.0.0    WebAdministration
Cmdlet          New-WebHandler                                     1.0.0.0    WebAdministration
Cmdlet          New-WebManagedModule                               1.0.0.0    WebAdministration
Cmdlet          New-Website                                        1.0.0.0    WebAdministration
Cmdlet          New-WebVirtualDirectory                            1.0.0.0    WebAdministration
Cmdlet          Remove-WebApplication                              1.0.0.0    WebAdministration
Cmdlet          Remove-WebAppPool                                  1.0.0.0    WebAdministration
Cmdlet          Remove-WebBinding                                  1.0.0.0    WebAdministration
Cmdlet          Remove-WebConfigurationBackup                      1.0.0.0    WebAdministration
Cmdlet          Remove-WebConfigurationLocation                    1.0.0.0    WebAdministration
Cmdlet          Remove-WebConfigurationLock                        1.0.0.0    WebAdministration
Cmdlet          Remove-WebConfigurationProperty                    1.0.0.0    WebAdministration
Cmdlet          Remove-WebGlobalModule                             1.0.0.0    WebAdministration
Cmdlet          Remove-WebHandler                                  1.0.0.0    WebAdministration
Cmdlet          Remove-WebManagedModule                            1.0.0.0    WebAdministration
Cmdlet          Remove-Website                                     1.0.0.0    WebAdministration
Cmdlet          Remove-WebVirtualDirectory                         1.0.0.0    WebAdministration
Cmdlet          Rename-WebConfigurationLocation                    1.0.0.0    WebAdministration
Cmdlet          Restart-WebAppPool                                 1.0.0.0    WebAdministration
Cmdlet          Restart-WebItem                                    1.0.0.0    WebAdministration
Cmdlet          Restore-WebConfiguration                           1.0.0.0    WebAdministration
Cmdlet          Select-WebConfiguration                            1.0.0.0    WebAdministration
Cmdlet          Set-WebBinding                                     1.0.0.0    WebAdministration
Cmdlet          Set-WebCentralCertProvider                         1.0.0.0    WebAdministration
Cmdlet          Set-WebCentralCertProviderCredential               1.0.0.0    WebAdministration
Cmdlet          Set-WebConfiguration                               1.0.0.0    WebAdministration
Cmdlet          Set-WebConfigurationProperty                       1.0.0.0    WebAdministration
Cmdlet          Set-WebGlobalModule                                1.0.0.0    WebAdministration
Cmdlet          Set-WebHandler                                     1.0.0.0    WebAdministration
Cmdlet          Set-WebManagedModule                               1.0.0.0    WebAdministration
Cmdlet          Start-WebAppPool                                   1.0.0.0    WebAdministration
Cmdlet          Start-WebCommitDelay                               1.0.0.0    WebAdministration
Cmdlet          Start-WebItem                                      1.0.0.0    WebAdministration
Cmdlet          Start-Website                                      1.0.0.0    WebAdministration
Cmdlet          Stop-WebAppPool                                    1.0.0.0    WebAdministration
Cmdlet          Stop-WebCommitDelay                                1.0.0.0    WebAdministration
Cmdlet          Stop-WebItem                                       1.0.0.0    WebAdministration
Cmdlet          Stop-Website                                       1.0.0.0    WebAdministration

I am hoping that you could shed some light.  Are you importing the WebAdministration module to access the 'older' cmdlets or are you mixing them both?  I am trying to avoid a scenario were my scripts are built up on WebAdministration and MS suddenly decomission the module in favor for IISAdministration.

Second question, do anyone know if anything has changed in IIS 10.0 when comes to moving C:\inetpub to another drive?  Is this still unsupported?

Thanks


Multi Site on Port 443

$
0
0

Hi,

I am running windows 2012 R2 server where i have applied a wildcard ssl in IIS however, i am not able to assign the port 443 to a sub domain.

Main domain - mydomain.com is on port 443

Sub domain - web.mydomain.com is on port 8888

I have purchased a wild card ssl which can be applied for *.mydomain.com but, when i try to assign the port 443 to web.mydomain.com, i am getting an error message saying " Port 443 is already assigned to another website ". How to overcome the issue?

Appreciate your help in this regard.

Thanks,

Narsimman.K

IIS 8.5 shows http 404 locally and remotely seemingly for PHP only

$
0
0

This has been driving me bonkers for a while now. I have the following setup: Windows Server 2012 R2 running IIS 8.5. On this server I've got both PHP and ASP.net 4 sites going. ASP.net sites work fine. PHP, though, does not. My one wordpress site (running the ProjectNami port of Wordpress), is displaying http404 on the local server when I enterhttp://defendersofcambridge.org/wp-admin/install.php, 500 when I hit up the same address from my local workstation in the same workgroup as the server, and 404 for others hitting it up outside the network. However, IIS logs show http 404 in all cases. Interestingly, the domain has one name server listed for it when I run a whois lookup, but nothing is reported when running it through intodns. (that's nothing having to do with this, though, I don't think.) Ought I to enable failed request tracing on this site only? Like I said ... the two asp.net sites run fine;http://cambridgeport90.net and http://stormlighttech.org. I didn't do anything to PHP before going to the install page, though even though the settings for MSSQL do appear in PHP.ini, the extension for it does not showwhen I bring up the list of extensions in PHP Manager. Not sure what is going on there, or whether that is a separate issue or not, but I figured I'd mention all possible relationships. I'm much stronger at maintaining ASP.net than PHP though, so please excuse any ignorant comments. Thanks for the hand!

2 level authentication with IIS

$
0
0

I wanted to see if anyone could provide some help with an Intranet site that I have created. Currently we are running straight Windows Authentication, but what we would like to do is provide an alternate method of logging in via a logon page for users that are not on the same or a trusted domain in addition to leaving the Windows Authentication running as well. I am running this on a server 2012 R2 box with IIS 8.5 and can't seem to figure out how to make it work. Any assistance would be greatly appreciated on getting this working.

Web Matrix PHP site

$
0
0

Every time I try to run a PHP program that I created in Web Matrix, it sends me to a page called "My Site" and asks me to login. All I want is for the site to show me the output of my code.

SSL connection between Windows 2012 R2 and IBM Http Server was failed periodically

$
0
0

Hi, I have met an issue recently. I found that my windows 2012 R2 server was sometimes failed to make ssl connection with IBM Http Server. The below are the information of both servers:

1. windows 2012 R2

   -Already enable TLS 1.2 and TLS 1.0

   -Already made the latest windows update and restart

   -IIS 8.5

2. IBM Http Server

   - Apache 2.2.31

   - using OpenSSL 1.0.2f

   - Enable TLS1.2 and TLS 1.0

I also captured the network traffic when both server. If the ssl connection was succeeded to create. The traffic flow will be like the following screen:

Image

If the ssl connection was failed to create, the network traffic was like the below:

Image

You will see that the ssl connection was failed when the TLS version was switched to TLSv1. And returned Access Denied.  The details of the Access Denied was like the below:

Image

As the screen captured shown above, you will see that the ssl protocol for the Client Hello was TLSv1.2 but running on TLSv1 Record Layer. this client hello was sent by the windows 2012 r2 server. I don't know why the ssl connection was switched to TLSv1 suddenly. 

I have found that Microsoft has released an update on 12 Jan 2016. This fix is about the SSL resumption. The update ID was 3109853  But I have already applied this update on my server. I have tried making the ssl connection with other type of server, the ssl connection could be made in stable status and without happened the issue I mentioned. Is there anyone met this case and solve finally?

Windows Authentication & PHP Uploaded File Permission

$
0
0

Hello,

We're using Windows Authentication on a Server 2008 R2 server for an employee-only intranet site.  Employees can upload images, but we're having an issue where the uploaded file only allows "SYSTEM", "<the uploading user>", and Administrators to access the file -- so other employees cannot see these images.

How do I configure IIS so the permissions on uploaded files are the parent folder's default permissions, or at least so the file is viewable by any authenticated user?

Opcode caching - Wincache or Zend?

$
0
0

We are having issues with Wincache Opcode caching using PHP 5.6 (which i will post separately).

I see that Opcode caching has been removed from Wincache 2.0 and as we are planning on moving to PHP 7 in the not too distant future I wanted to discuss my options. It seems like lots of people are having issues with Zend Opcache on windows that makes it effectively unusable. 

Is that your experience? Why did you decide to remove Opcode caching from Wincache 2.0?

I would love to know how people are handling this issues:


Configure NTFS permissions so that that PHP scripts on a PHP-FastCGI website cannot access files outside C:\inetpub

$
0
0

The server (Windows Server 2012 R2 and IIS 8.5) has only a C: drive.

I have decided to keep websites in the default folder structure C:\intepub, since it appears to be protected by UAC.

For now, we will only have PHP sites on the server, but that may change later. I have created a PHPSites subfolder under C:\inetpub.

I would like to configure IIS and PHP so that PHP scripts on the web sites do not have NTFS permissions to access any files outside the C:\inetpub\PHPSites folder, or at least outside C:\inetpub.

I have created an Application Pool that uses the ApplicationPoolIdentity application pool account. This is the configuration recommended by Microsoft: https://technet.microsoft.com/en-us/library/jj635855(v=ws.11).aspx

To keep IIS or PHP from accessing files outside C:\inetpub, I created an account IUSR_PermissionsTest that is currently not a member of any group. I confiured IIS to use this as the Anonymous Access account. PHP is set up to allow impersonation: fastcgi.impersonate = 1 (http://stackoverflow.com/questions/1575158/setting-permission-for-php-or-i-user-im-not-sure-here-to-connect-to-iisw)

Unfortunately, this setup allows PHP scripts to open files under for example C:\Program Files (x86) - I was able to open C:\Program Files (x86)\Microsoft SQL Server\90\Shared\Resources\1033\License_SqlBrowser.txt and display its contents in the browser. (I choose this file because the entire Microsoft SQL Server folder was preinstalled on the server and I have no reason to think it's not configured correctly. The file seems to inherit permissions for the Users group from C:\Program Files (x86)).

To test, I set up four tiny test sites, each with a simple PHP script and the following folder permissions:
1) Default permissions (SYSTEM, Administrators and TrustedInstaller have Full Control, Users has Read & execute, List folder contenst, and Read permissions)
2) I removed Users and added the ApplicationPoolIdentity account (IIS AppPool\PermissionsTest) with Read & execute, List folder contenst, and Read permissions
3) I removed Users and added the IUSR_PermissionsTest account with Read & execute, List folder contenst, and Read permissions
4) Default permissions, same as (1). The PHP script on this site, however, attempts to read and display "C:\Program Files (x86)\Microsoft SQL Server\90\Shared\Resources\1033\License_SqlBrowser.txt"

Of these, only (1) and (4) work. (As long as I can't keep PHP scripts from reading files outside C:\inetpub, the non-working test sites are not a top priority.)
(2) returns error 401.3 Unathorized for the PHP script
(3) returns error 500.19, Cannot read configuration file due to insufficient permissions.
(4) is in fact able to read and display the contents of the License_SqlBrowser.txt file, and I would like to prevent the PHP script from doing that.

(Note: Configuring open_basedir in PHP might help to solve this, but there will be some folders outside c:\inetpub where I will also need to run PHP scripts. Also, I would like to use NTFS permissions for added security, and not rely solely on open_basedir being 100% reliable.)

Oddly enough, turning off impersonation in PHP.ini (fastcgi.impersonate = 0), which should make the worker process and FastCGI run under ApplicationPoolIdentity made no difference in what errors I was receiving. I had expected case (2), where the ApplicationPoolIdentity has access to the website folder, to start working, but it did not. The script I'm using in case (4) displays the current setting, so I know it has retrieved the most recent copy of php.ini. It also still displays the contents of the License_SqlBrowser.txt file.

I have also tried to make the IUSR_PermissionsTest account a member of the Guests group, and to use IUSR and the ApplicationPoolIdentity accounts as the IIS Anonymous Authentication account, neither of which changed anything.

I must be missing something (or several somethings), but what? Surely there must be a way to configure accounts and permissions for IIS and PHP so that PHP scripts on a website do not have permissions to read files outside C:\inetpub?

Connect via hostname or IP act different??

$
0
0

Hi,

I have a web page on ISS 8.5 (Windows Server 2012 R2). Project name is KTS. Server name is MANKTS and it's IP is 10.3.11.165.

On an other computer, When I connect webpage like "http://10.3.11.165/KTS/", everything is ok. But when I connect like "http://MANKTS/KTS/" webpage behave an old webpage (internet explorer behave like IE7).  And my webpage looking bad.

servername

and wtih IP:

IP

And the web.config:

<?xml version="1.0" encoding="UTF-8"?><configuration><appSettings><add key="Telerik.Skin" value="Windows7" /><add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" /><add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled" /></appSettings><connectionStrings><add name="SQL_ConnectionStr" connectionString="Data Source=***;Initial Catalog=KTS;User ID=***;Password=***" /><add name="SQL_ConnectionStr_Kart" connectionString="data source=***;initial catalog=***;Password=***;persist security info=True;user id=***" /></connectionStrings><system.web><compilation debug="false" targetFramework="4.5" /><httpRuntime targetFramework="4.5" /><pages controlRenderingCompatibilityVersion="4.5"><controls><add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" /></controls></pages><httpHandlers><add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" /><add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" /><add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" /><add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" /><add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /></httpHandlers><globalization culture="tr-TR" uiCulture="tr-TR" /><customErrors mode="Off" /></system.web><system.webServer><validation validateIntegratedModeConfiguration="false" /><handlers><remove name="ChartImage_axd" /><add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" /><remove name="Telerik_Web_UI_SpellCheckHandler_axd" /><add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" /><remove name="Telerik_Web_UI_DialogHandler_aspx" /><add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" /><remove name="Telerik_RadUploadProgressHandler_ashx" /><add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" /><remove name="Telerik_Web_UI_WebResource_axd" /><add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" /></handlers></system.webServer></configuration>

How can I fix this? It's urgent for me.

Many thanks.

URL rewrite 101 - how do I prevent the dreaded redirect loop?

$
0
0

I frequently set up web sites for applications that don't have a typical, default home page. For example right now I'm trying to rewrite all incoming requests for: printing.mydomain.com to printing.mydomain.com/psp/app/ . Without a "condition"...I get a redirect loop error.

If I'm simply trying to rewrite a specific domain name to a specific domain name and URL. do you need to create a condition for instances like these in order to prevent a redirect loop?

Here's what I did and it seems to work (oddly, in some instances), but I'm not sure if it's the correct or "best" way to handle this URL rewrite 101 problem:

        <rewrite>
            <rules>
                <rule name="PSP redirection to home page" enabled="true" stopProcessing="true">
                    <match url="(.*)" />
                    <action type="Rewrite" url="http://{C:0}/PSP/app/" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="^OFF$" />
                    </conditions>
                </rule>
            </rules>
        </rewrite>
        <httpRedirect enabled="false" destination="http://printing.mydomain.com/psp/app/psp_start.asp" exactDestination="true" httpResponseStatus="Permanent" />

Comments? Suggestions?

Thank you!

Ed

Web Farm Agent Service starting problems

$
0
0

I am increasingly getting issues with the Web Farm Agent Service not starting on servers. "Error 1053, the service did not respond to the start or control request in a timely fashion"

I have ran the  windbg.exe monitor on it... but the output might as well be in a foreign language as it makes no sense... (out of around 100 servers I am seeing this on 6 so far.. but I fear this is going to increase)

Any ideas? I really do not want to have to go down the route and reinstalling this every time.


 

PHP health test

$
0
0

Hello

unable to get this to work in DEV and PROD environments. line 130 down: //errors display_errors NG bool(true)  string(0) "" display_startup_errors NG bool(true)  string(0) ""

Viewing all 28058 articles
Browse latest View live


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