Showing posts with label Web server. Show all posts
Showing posts with label Web server. Show all posts

How to set up SMTP Virtual Server with IIS

Exception: Mailbox unavailable. The server response was: 5.7.1

Check the following settings in IIS

IIS -> Default SMTP Server -> Properties -> Access
1. Authentication -> Anonymous access -> Checked
2. Connection control -> Only the list below -> Add current web server ip
Relay restrictions > Relay > - Only the list below -> Add current web server ip

Also add localhost ip here 127.0.0.1 . If DNS lookup doesnt work you can add alias for 127.0.0.1 in your
C:\WINDOWS\system32\drivers\etc\hosts file.

Also it is necessary to have these lines in web.config


<system.net>
<mailsettings>
<smtp deliverymethod="network" from="user@domain.com">
<network host="localhost" port="25" defaultcredentials="true">
</network>
</smtp>
</mailsettings>
</system.net>

Default Web Site on IIS doesn't work until changing the default port.

It is a very strange problem that occurs sometimes.
"IS Unexpected error 0x8ffe2740"
Today I have just found the reason - Skype is using the default port 80 for alterantive connection.
Resolve that by:
Skype File, Options, Advanced, Connection
Uncheck "Use Port 80 as an alternatives for incoming connections" and restart default website or IIS

How to install PHP on IIS

PHP installation on IIS 7.0 (Windows VISTA)
I will not explain how to do it, just see this good article:
http://blondr.blogspot.com/2006/11/set-up-iis-7-w-mysql-and-php-5.html
It includes also the settings for MySQL and php session' permission.


PHP installation on IIS 5.1

1) add to path c:\PHP
2) rename php.ini-recomended to php.ini

doc_root = c:\inetpub\wwwroot // for IIS/PWS
doc_root = c:\apache\htdocs // for Apache
extension_dir = "c:\php\ext"
cgi.force_redirect = 0
set browscap to c:\windows\system32\inetsrv\browscap.ini

If you want to use the CGI binary, do the following:

* Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
* Change the Execute Permissions to 'Scripts only'
* Click on the 'Configuration' button, and choose the Application Mappings tab. Click Add and set the Executable path to the appropriate CGI file. An example PHP 5 value is: C:\php\php-cgi.exe Supply .php as the extension. Leave 'Method exclusions' blank, and check the 'Script engine' checkbox. Now, click OK a few times.
*

Set up the appropriate security. (This is done in Internet Service Manager), and if your NT Server uses NTFS file system, add execute rights for I_USR_ to the directory that contains php.exe / php-cgi.exe.

To use the ISAPI module, do the following:

* If you don't want to perform HTTP Authentication using PHP, you can (and should) skip this step. Under ISAPI Filters, add a new ISAPI filter. Use PHP as the filter name, and supply a path to the php4isapi.dll / php5isapi.dll.
* Under 'Home Directory', 'Virtual Directory', or 'Directory', do the following:
* Change the Execute Permissions to 'Scripts only'
* Click on the 'Configuration' button, and choose the Application Mappings tab. Click Add and set the Executable path to the appropriate ISAPI DLL. An example PHP 5 value is: C:\php\php5isapi.dll Supply .php as the extension. Leave 'Method exclusions' blank, and check the 'Script engine' checkbox. Now, click OK a few times.
* Stop IIS completely (NET STOP iisadmin)
* Start IIS again (NET START w3svc)
3) add user rights to php directory (IIS user - modify, IUSR_MASNINENAME - read)

There is a way to run ASP.NET on Apache server

There is a way to run ASP.NET on Apache server :-) . I read some posts about it and found a good articles to make this possible:
This is enough to do it
http://weblogs.asp.net/israelio/archive/2005/09/11/424852.aspx

One problem: there are ASP.NET controls that don't work in this way. Use it only for simple asp.net pages.