PDA

View Full Version : Lỗi khi tạo project trong asp.net



copper
25-08-2004, 03:01
Lỗi thư nhất :
Mình tạo một Visual basic projects \ Asp.net web application thì bị báo lỗi như sau :

http://www.diendantinhoc.com/attachment.htm?attachmentid=3941

2. Khi mình dùng webmatric tạo ra một trang .aspx. lúc chạy bằng webmatric server thì không vấn đề gì. Nhưng khi chạy bằng IIS 6.0 thì báo lỗi như sau :


Server Error in '/' Application.
--------------------------------------------------------------------------------

Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files\root\2135a508\8d69a834" is denied.
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.UnauthorizedAcces***ception: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files\root\2135a508\8d69a834" is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

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:


[UnauthorizedAcces***ception: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Tempo rary ASP.NET Files\root\2135a508\8d69a834" is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +632
System.IO.Directory.CreateDirectory(String path) +195
System.Web.Compilation.PreservedAssemblyEntry.DoFi rstTimeInit(HttpContext context) +85
System.Web.Compilation.PreservedAssemblyEntry.Ensu reFirstTimeInit(HttpContext context) +97
System.Web.Compilation.PreservedAssemblyEntry.GetP reservedAssemblyEntry(HttpContext context, String virtualPath, Boolean fApplicationFile) +29
System.Web.UI.TemplateParser.GetParserCacheItemFro mPreservedCompilation() +91
System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean fCreateIfNotFound) +148
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath() +125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.TemplateControlParser.CompileAndGetP arserCacheItem(String virtualPath, String inputFile, HttpContext context) +120
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String virtualPath, String inputFile, HttpContext context) +36
System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context, String requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep.Execute() +95
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +173




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573


Mình còn một số câu hỏi khác mong mọi người giúp đỡ :

1. Khi mình lây một web project vể thì nó luôn báo lỗi : Thì Map giữa URL và thư mục lưu trữ web project luôn luôn là không đúng. Mình luôn phải tạo ra một đường dẫn giống như thế trên máy con và tạo ra một Web sharing có aliases giống như phần cài đặt trong project mang vể. Vậy có cách nào để sửa thông tin cài đặt mặc định đó không? (Mình có thể lưu trữ web project ở bất kỳ thư mục nào?)
2. Làm thế nào để đưa một web project lên host?
3. Mình có thể dùng visual studio.net để sửa trực tiếp các file trên một host không?

Rất mong được giúp đỡ. thanks

Cận
25-08-2004, 05:24
2/ upload các file aspx, web.config và file dll trong thư mục bin lên host rồi chạy bình thường.
3/ vẫn được, chắc bạn xài VDSL lol :lick:

copper
26-08-2004, 08:41
Trời vấn đề khó thế sao ? không thấy ai trả lời vậy, hay các bác giấu nghề hết rồi.

zhiivn
27-08-2004, 11:28
Bạn thử coi lại mình cài .NET đúng chưa.
Trong phần báo lỗi thông báo bạn không có quyền.

"To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access."