Find Jobs
Hire Freelancers

Create a virtual directory (application pool in vb.net)

$30-100 USD

已取消
已发布超过 17 年前

$30-100 USD

货到付款
I use windows 2003 standard with IIS 6.0. I have this source code down here to create a virtual directory with application pool on a folder. But it only works on development server in visual studio 2005. It doesn't work on IIS 5.1 or 6.0. Give me some permission error. Here's the description following Here's link to my ftp server for my source codes. <[login to view URL]> ## Deliverables **[login to view URL]** <% Page Language="VB" AutoEventWireup="false" CodeFile="[login to view URL]" Inherits="_Default" Debug="true" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[login to view URL]"> <html xmlns="[login to view URL]" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </div> </form> </body> </html> **[login to view URL]** Imports [login to view URL] Imports System Imports [login to view URL] Imports [login to view URL] Imports [login to view URL] Imports [login to view URL] Imports [login to view URL] Imports [login to view URL] Imports [login to view URL] Imports [login to view URL] Imports [login to view URL] Imports [login to view URL] Imports [login to view URL] Partial Class _Default Inherits [login to view URL] Protected Sub Page_Load(ByVal sender As [login to view URL], ByVal e As [login to view URL]) Handles [login to view URL] If Not IsPostBack Then CreateVirtualDir("localhost", "test", "e:\test") End If End Sub Private Sub CreateVirtualDir(ByVal WebSite As String, ByVal AppName As String, ByVal Path As String) 'Dim IISSchema As New [login to view URL]("IIS://" & WebSite & "/Schema/AppIsolated") Dim IISSchema As New [login to view URL]("IIS://" & WebSite & "/Schema/AppIsolated", "Administrator", "1212") Dim CanCreate As Boolean = Not [login to view URL]("Syntax").[login to view URL]() = "BOOLEAN" [login to view URL]() If CanCreate Then Dim PathCreated As Boolean Try Dim IISAdmin As New [login to view URL]("IIS://" & WebSite & "/W3SVC/1/Root") 'make sure folder exists If Not [login to view URL](Path) Then [login to view URL](Path) PathCreated = True End If 'If the virtual directory already exists then delete it For Each VD As [login to view URL] In [login to view URL] If [login to view URL] = AppName Then [login to view URL]("Delete", New String() {[login to view URL], AppName}) [login to view URL]() Exit For End If Next VD 'Create and setup new virtual directory Dim VDir As [login to view URL] = [login to view URL](AppName, "IIsWebVirtualDir") [login to view URL]("Path").Item(0) = Path [login to view URL]("AppFriendlyName").Item(0) = AppName [login to view URL]("EnableDirBrowsing").Item(0) = False [login to view URL]("AccessRead").Item(0) = True [login to view URL]("AccessExecute").Item(0) = True [login to view URL]("AccessWrite").Item(0) = False [login to view URL]("AccessScript").Item(0) = True [login to view URL]("AuthNTLM").Item(0) = True [login to view URL]("EnableDefaultDoc").Item(0) = True [login to view URL]("DefaultDoc").Item(0) = "[login to view URL],[login to view URL],[login to view URL]" [login to view URL]("AspEnableParentPaths").Item(0) = True [login to view URL]() 'the following are acceptable params 'INPROC = 0 'OUTPROC = 1 'POOLED = 2 [login to view URL]("AppCreate", 1) Catch Ex As Exception If PathCreated Then [login to view URL](Path) End If Throw Ex End Try End If End Sub End Class **Error on <http://localhost/[login to view URL]>** Access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.UnauthorizedAccessException. **Source Error:** An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. **Stack Trace:** [UnauthorizedAccessException: Access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))] [login to view URL](String WebSite, String AppName, String Path) +1238 _Default.Page_Load(Object sender, EventArgs e) +43 [login to view URL](EventArgs e) +99 [login to view URL]() +47 [login to view URL](Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061 ## Platform windows 2003 standard sp 1 with visual studio 2005 and sql 2005. IIs 6
项目 ID: 3797672

关于此项目

远程项目
活跃18 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作

关于客户

UNITED STATES的国旗
United States
0.0
0
会员自4月 26, 2003起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。