0

I have a webform asp.net project (with framework 4.5.1) and I'm trying to put it an a virtual directory in iis (10) but i faced below error.

for details i should say, at first i went to iis i added a website with Last_Edition name and then set physical path where my project located.(the last edition subfolder in the visual studio solution).

http Hostname: desktop-62c6tdv (MY machine name) and port:80

so what could be the problem?

I checked:

  1. Clean and rebuild everything
  2. i tried using the automatic local iis connection that visual studio made for project and that works correctly(it means i can browse the webpages with http://localhost:1317/Default.aspx address that visual studio made for debug but i can't make same manualy)

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Could not load type 'Last_edition.Default'.

    Source Error:

    Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Last_edition.Default" %> Line 2:
    Line 3:

    Source File: /default.aspx Line: 1

Priya
  • 1,359
  • 6
  • 21
  • 41
iman
  • 173
  • 2
  • 2
  • 11
  • when deploying the web application did you copy the dll as well? – derloopkat Apr 04 '16 at 11:20
  • @derloopkat actually i didn't know to what should i copy or don't copy so i set the whole project directory as physical path. and the .dll files are located in bin folder – iman Apr 04 '16 at 11:50
  • I'd suggest to check you application pool is using that framework. – derloopkat Apr 04 '16 at 11:57
  • @derloopkat how can i check application pool? and what thing i can check in app pool? – iman Apr 04 '16 at 12:48
  • In iis right click on your website, click on "advanced settings" (in the column at your right), get the Application pool name for your web site. Press cancel and go to Application Pools. Select the same application pool and go to advanced settings. Check .Net CLR Version (that's the framework) and if your application was compiled in 32 bits then Enable 32 bits should be True. – derloopkat Apr 04 '16 at 12:57
  • @derloopkat it's v4.0 but in web.config it set: targetFramework="4.5" the app is compiled 64bits and it's false – iman Apr 04 '16 at 13:09
  • Are your dlls into bin folder or bin/Debug, bin/Release, etc ? – derloopkat Apr 04 '16 at 13:10
  • @derloopkat it's in bin. 14 .dll files – iman Apr 04 '16 at 13:11
  • In your aspx, replace CodeBehind with CodeFile. – derloopkat Apr 04 '16 at 13:27
  • it solved :D. Thank you very much!!! @derloopkat – iman Apr 04 '16 at 13:38
  • 2
    Possible duplicate of [Parser Error Message: Could not load type 'sometype'](http://stackoverflow.com/questions/15071220/parser-error-message-could-not-load-type-sometype) – derloopkat Apr 04 '16 at 13:42

0 Answers0