Sei sulla pagina 1di 14

AxCMS.

net Help & Support Center > Installation & Configuration > Configuration > WebDAV

Table Of Contents -WebDAV - IIS7

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV

AxCMS.net and WebDAV


WebDAV installation
Create WebDAV virtual folder in IIS pointing to AxCMSWebDav directory of your CMS installation. Do not create WebDAV virtual folder under existing CMS web sites or virtual folders. 1. Set following properties for this virtual folder: 1. Add wildcard application mapping to aspnet_isapi.dll 1. In IIS5, click Configuration - Mappings - Add. Set Executable path to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll and Extension to .*. Check All verbs and uncheck Check that file exists 2. In IIS6, click Configuration - Mappings - Insert. Set Executable path to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll and uncheck Verify that file exists. 3. In IIS7, set your application pool to Classic .NET AppPool (or other application pool with classic managed pipeline mode), then in Handler Mappings, Add Script Map, with Request path '*' and executable C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll. In Request Restriction, Make sure "Invoke handler..." is unchecked and All verbs is selected on Verbs tab. 2. Set proper access permissions 1. Go to Directory Security - Authentication and access control - Edit 2. If you plan to use AxCMS.net authentication for WebDAV, check Enable anonymous access and uncheck all other authentication methods. Make sure anonymous access settings have the correct account assigned and Allow IIS to control password checked. 3. If you plan to use Active Directory authentication for WebDAV check Integrated Windows authentication and uncheck all other authentication methods and Enable anonymous access. 2. If you use IIS6, enable WebDAV in the IIS Manager (node Web Service Extensions) - this is needed so IIS responds to queries with complete set of webdav commands. On IIS7, this option is located in WebDAV Authoring Rules, and there Enable WebDAV. 3. Go to AxCMSWebDav directory of your AxCMS.net installation and create web.config configuration file with at least following contents (see an example web.config file below): 1. <appSettings> section 1. <add key="DBCONNSTRING" value="SERVER=(local);DATABASE=AxCMS;UID=AxinomCMS;PWD=AxinomCMS1" /> Put connection string to your AxCMS.net database here. Use the same value as in AxCMSWeb web.config. 2. <add key="DAVApplicationURL" value="http://your_computers_name/AxCMSwebDAV" /> Put URL to WebDAV virtual folder you created. URL should not end with / and should not be localhost Since AxCMS.net 8.0, you should use another property: <add key="DAVApplicationVirtualPath" value="/AxCMSwebDAV" /> Then you can use WebDav with any host header. 3. <add key="MediaServerRootDir" value="C:\projects\AxCMS\AxCMSweb" /> Put full path to AxCMSweb folder. Use the same value as in AxCMSWeb web.config. 4. <add key="CMSSystemRootDir" value="c:\Projects\AxCMS\AxCMSweb" /> Put the physical path to the AxCMS.net-installation directory. Use the same value as in AxCMSWeb web.config. 5. <add key="CMSApplicationVirtualPath" value="/AxCMSweb" /> Put the full virtual path to the AxCMS.net-application (if any). Use the same value as in AxCMSWeb web.config.

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV

2. <system.web> section 1. If you plan to use AxCMS.net authentication for WebDAV, add following: <authentication mode="None"></authentication 2. If you plan to use Active Directory authentication for WebDAV, add following: <authentication mode="Windows"></authentication> 4. If you plan to use Active Directory authentication for WebDAV, set AxCMSWeb to use active directory and import active directory users to AxCMS.net users. 5. Make sure users who may access WebDAV have a role to pass WebDavAccess checkpoint. Make sure users have appropriate rights and roles for other WebDAV checkpoints. 6. Open Windows Explorer and try to open your WebDAV installation using UNC path, like \\webdavserver\webdavpath\. If you are using Active Directory authentication for WebDAV and logged in into the same active directory, no password will be asked. If you are not logged into active directory, enter your active directory username like DOMAIN\username and password. If you are using AxCMS.net authentication for WebDAV, enter AxCMS\username and password.

How to setup WebDAV in a productive environment


In the productive environment you normally cannot create a virtual folder directly. You have to create a virtual site first. Unfortunately you cannot place WebDAV virtual folder under the CMS virtual site. Windows Explorer seems to connect and to authenticate itself to the host part of a WebDAV URL. The Forms authentication of a CMS web application will confuse it. To install WebDAV on a productive environment do exactly the following: 1. Create a new empty directory AxCMSWebDAV_Dummy. Don't place any sensitive data in it. 2. Create a new virtual site with the home directory AxCMSWebDAV_Dummy. It should use some url other than your CMS url as host header. 3. Allow anonymous authentication and disable all other authentication methods for that site. 4. Leave the default ASP.NET application created for you by the wizard, but make sure you have no execute permissions for it (Execute Permissions: None). 5. If your CMS is based on ASP.NET 2.0, switch the version in the ASP tab to the 2.0 version and put the application into the application pool for Framework 2.0 applications. 6. Add a virtual folder under that virtual site pointing to a AxCMSWebDAV directory with the AxCMSWebDAV application. Note: the AxCMSWebDAV directory must not be under AxCMSWebDAV_Dummy on the harddrive. 7. Configure this virtual folder as described above. 8. Note that most probably trying to open the WebDAV folder configured this way from the same computer will not work. Use other computer as client or set up your WebDAV folder in Default Web Site.

WebDAV installation troubleshooting


Follow the next steps to find out the reason of the problem: 1. Try to open WebDAV with usual browser by opening WebDAV URL, like http://webdavserver/webdavpath/. If the CMS WebDAV application is normally functioning, you should get XML document with properties of the URL. If you can get the XML, but you cannot access the share in Windows Explorer, most probably you've misconfigured the virtual site in the productive environment (see "How to setup WebDAV in a productive environment" above). 2. Check exceptions in you exceptionManagment, you might have misconfigured paths to the system. 3. Try to monitor HTTP traffic between WebDAV client and WebDAV server. Check the requests of the client and responses of the server.

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV

4. Don't forget you have to login as AxCMS\<username>, not just as <username>. 5. Do not rely on error messages returned by Windows Explorer or "net use" command. They are always misleading. Again, see the point 2. 6. Make sure WebClient service is running on your client computer - it is required for Windows explorer to connect to webdav. For Windows XP x64 and Windows 2003 you may need to install the Web Extender Client component - see this KB article. 7. Try to restart client computer to restart the web client service and its connection to Windows Explorer. Try to open another webdav location to let Windows Explorer know about web client service.

Known limitations of WebDAV clients


1. WebDAV cannot be run as a separate website. There are problems with interpreting separate WebDAV websites by Windows Explorer. 2. When WebDAV virtual folder is located under the site other than Default Web Site, it will not open from the same computer. This is the problem of Windows Explorer. 3. Categories containing any of these symbols - \ / : * ? " < > | - prohibited file name symbols in Windows, will not display and function correctly. 4. Windows Vista has problems opening Page shortcuts from WebDAV folder. You can map your WebDAV folder as network drive as a workaround for this bug. 5. When deleting file or folder, even if error occurred and the item is not deleted, Windows Explorer removes it from the list. After refresh it shows the item again, but doesn't allow any actions with it until the folder structure is completely refreshed. 6. These applications are known to have problems working with WebDAV in AxCMS.net: PhotoShop AutoCAD

Web.Config Example
<?xml version="1.0" encoding="utf-8" ?> <configuration>

<configSections> <section name="exceptionManagement" type="Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManagerSectionHandler, Microsoft.ApplicationBlocks.ExceptionManagement" />

</configSections>

<exceptionManagement> <publisher mode="on" assembly="Axinom.Framework" type="Axinom.Framework.Exception.ExceptionPublisherFile" File="D:\Inetpub\MyApplicationFolder\WebDAV_exception.txt" /> </exceptionManagement>

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV

<appSettings> <add key="DBCONNSTRING" value="SERVER=(local);DATABASE=AxCMS_MyDB;UID=MyUsername;PWD=MyPassword" /> <add key="DAVApplicationVirtualPath" value="/AxCMSwebDAV" /> <add key="MediaServerRootDir" value="C:\projects\AxCMS\AxCMSweb" /> <add key="CMSInstanceName" value="Entwicklungs-CMS" /> <add key="EncryptPasswordsMS" value="0" /> <add key="IsAxCMS" value="1"/> <add key="CMSApplicationHostName" value="http://localhost" /> <add key="CMSSystemRootDir" value="C:\projects\AxCMS" /> <add key="CMSApplicationVirtualPath" value="/AxCMSweb" /> <add key="CmsExtension" value=".AxCMS" /> <add key="PublishDirectory" value="/publish" /> </appSettings>

<system.web> <compilation defaultLanguage="c#" debug="true" /> <customErrors mode="Off" /> <authentication mode="None" />

<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />

<sessionState mode="InProc" cookieless="false" timeout="20" />

<globalization

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV

requestEncoding="utf-8" responseEncoding="utf-8" />

<httpRuntime executionTimeout="60000" maxRequestLength="500000" /> </system.web>

</configuration>

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV > IIS7

Configuring AxCMSWebDav on IIS 7.x


Installing WebDAV 7.5 for IIS
Installing for IIS 7.0 Installing for IIS 7.5

Configuring AxCMSWebDAV
AxCMSWebDAV Files web.config IIS Application WebDAV in a productive environment ISAPI application mapping Enabling WebDAV Testing WebDAV installation Accessing WebDAV folder

Installing WebDAV 7.5 for IIS Installing for IIS 7.0


IIS 7.0 users (Windows Vista, Windows Server 2008) need to install WebDAV package additionally. There are two separate downloadable packages for the new WebDAV extension module; you need to download the appropriate package for your version of Windows: 32-bit Installation Package: WebDAV 7.5 for IIS 7.0 (x86) 64-bit Installation Package: WebDAV 7.5 for IIS 7.0 (x64) You must run the installation package as an administrator. For additional installation help please proceed to the official IIS 7 guide: http://learn.iis.net/page.aspx/350/installing-and-configuringwebdav-on-iis-70/

Installing for IIS 7.5


IIS 7.5 users (Windows 7, Windows Server 2008 (R2)) need to add WebDAV from Server Manager. Go to Start - Server Manager, scroll down to Web Server (IIS) role and check whether you have WebDAV Publishing installed or not. Otherwise click Add Role Services button.

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV > IIS7

In the appeared Role Services window add WebDAV Publishing

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV > IIS7

Configuring AxCMSWebDAV AxCMSWebDav files


Ensure that you have AxCMSWebDav package under your AxCMS_PremiumSample folder

web.config
Under your AxCMSWebDav folder you should create web.config file. Here is example of working web.config for localhost (DEV) environment. If you use this sample config file, don't forget to take a look at its content. Maybe you should change Database connection string or application URLs if you have non-standard AxCMS.net installations. In the end of config file there is ISAPI module mapped, if your system is 32 bit you should replace <add name="Script" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64 \v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0, bitness64" /> with <add name="Script" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework \v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv2.0, bitness32" />

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV > IIS7

IIS Application
Go to Internet Information Services (IIS) manager, right click on Default Web Site and create application like on pictures below: Set application pool to Classic .NET AppPool (or other application pool with classic managed pipeline mode).

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV > IIS7

WebDAV in a productive environment


In the productive environment you normally cannot create a virtual folder directly. You have to create a virtual site first. Unfortunately you cannot place WebDAV virtual folder under the CMS virtual site. Windows Explorer seems to connect and to authenticate itself to the host part of a WebDAV URL. The Forms authentication of a CMS web application will confuse it. if you need a whole Web Site for your WebDAV environment do next: 1. Create Web Site pointing to some location e.g. %SystemDrive%\inetpub\wwwroot 2. Under your Web Site create WebDAV Application pointing to C:\Projects\AxCMS_PremiumSample\AxCMSwebDAV

ISAPI application mapping


Go to Handler Mappings under your AxCMSWebDav application and add Wildcard Script Map with Request path "*" and Executable "%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" for 64 bit systems or "%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" for 32 bit systems

Enabling WebDAV
Under Web Site where you created AxCMSWebDav application enable WebDAV Authoring Rules

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV > IIS7

Testing WebDAV Installation


To be sure you configured WebDAV correctly, try to open it in your browser. Login with user: AxCMS\axinom, password: axinom (case sensitive). You should get XML like on picture:

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV > IIS7

Accessing WebDAV folder


You should access WebDAV from client machine. You could get authorization error if you try to access WebDAV from the server itself. Go to your Internet Explorer browser. Expand File menu end choose Open. In the appeared window type the url of your WebDAV (http://PCname/AxCMSWebDav) and tick Open As Web Folder. Login with (login credential is case sensitive) User: AxCMS\axinom Password: axinom

AxCMS.net Help & Support Center > Installation & Configuration > Configuration > WebDAV > IIS7

After you should get opened web folder like on picture

If you are expecting problems with logging then refer help form Microsoft Knowledge Base: http://support.microsoft.com/default.aspx/kb/888123

Potrebbero piacerti anche