23

I'm trying to deploy my website on somee.com but keeps getting this error

enter image description here

I've tried googling and it says I have to change my App Pool to ASP.NET 4.0. I've tried that already but with no luck:(

Informations:

-My site was coded in 4.0 Framework
-I'm using .NET Framework v4.0 Integrated
-I have checked needed things already in Windows Features
-Im using ASP.NET MVC3
-I already typed cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319 then aspnet_regiis -ir to cmd
-64 bit OS

This is the steps how I publish my site

  1. First I manually added this things to my Reference then changed the Copy Local to True

    Microsoft.Web.Infrastructure
    System.Web.Helpers
    System.Web.Mvc
    System.Web.Razor
    System.Web.WebPages
    System.Web.WebPages.Deployment
    System.Web.WebPages.Razor

  2. I Editted this on my Web Config

    <configuration>
    <system.web>
    <customErrors mode="Off"/>
    <compilation debug="true" targetFramework="4.0"/>
    <authentication mode="None"/>
    </system.web>
    </configuration>

  3. I add Deployable Dependencies that created _bin_deployableAssemblies which have this inside

    Microsoft.Web.Infrastructure.dll
    System.Web.Helpers.dll
    System.Web.Mvc.dll
    System.Web.Razor.dll
    System.Web.WebPages.dll
    System.Web.WebPages.Deployment.dll
    System.Web.WebPages.Razor.dll

  4. I then click Publish and have this settings

    This is how I Publish is this ok or I have to change something here? enter image description here

  5. I went to my IIS Manager. I right click on Default Web site Under Sites and choose Add Application with this settings enter image description here

  6. This resulted to this
    enter image description here enter image description here

  7. I went to C:/inetpub/wwwroot and sees this files
    enter image description here

  8. I then compressed it as zip then uploaded it in my account in somee.com then checked my site and now I'm getting the Configuration Error above.

    ABOVE IS MY UPDATED QUESTION I REPUBLISHED MY SITE AND INCLUDED STEPS HOW I PUBLISHED IT . I INCLUDED IT SO THAT YOU GUYS COULD SUGGEST IF I'M DOING SOMETHING WRONG ON HOW I'M PUBLISHING MY SITE AND COULD BE THE REASON OF THE ERROR ABOVE. THANKS IN ADVANCE :)


    My site works fine in the iis of the localhost of my machine it only gets that error when deployed on the internet. Btw I'm following the tutorials from these sites How to Deploy an ASP.NET MVC 3 App to Web Hosting with "\bin Deployment" Programming ASP.NET MVC 4 Chapter 19. Deployment Deployment ASP.NET MVC 3 project to IIS and somee

    Question: What could be the cause of this issue :( It's my first time to deploy a website on the internet. Hopefully you could help me guys.. If you need more info please tell me.

My IIS Manager enter image description here

My configuration enter image description here

or could this be the reason of my issue?

enter image description here


OK THIS PROBLEM WAS SOLVED. I FOUND OUT THERE'S NO PROBLEM ON MY SETTINGS. THE PROBLEM IS ON THE SETTINGS OF THE WEBHOSTING SITE. I CHANGED THE ASP.NET VERSION FROM 2.0 TO 4.0 BUT FORGOT TO CLICK THE UPDATE BUTTON :( I FEEL BAD I HAVEN'T REALIZED THAT. I'M NOW FACING ANOTHER ERROR BUT IT HAS NOTHING TO DO WITH THIS QUESTION. THANKS GUYS FOR TRYING TO HELP ME :)

14
  • 2
    So above shows you are deploying this not to the root but to a folder underneath it. What is your default site setup to run as? Is there anything there? In IIS is your application setup as an "application" or simply a folder - this could be the source of your issue. Right click on your app in IIS and ensure "Convert to application" isn't there - if it is, run it. Give that whirl Commented Mar 13, 2013 at 6:51
  • It's running under DefaultAppPool. See my updated question I included some photos there. Maybe that could be the cause of the issue. Commented Mar 13, 2013 at 7:56
  • 1
    Lets keep this simple. Publish to your local file system. Remove everything on your server under your default website folder. copy everything into that root web folder. You've got all sorts of stuff in that root folder plus your projectpal. We want to deploy projectpal to the root, correct? Commented Mar 15, 2013 at 4:30
  • 1
    @sxyback use these steps Control Panel >> Programs >> Uninstall a program >> Microsoft .NET Framework 4 Extended >> Click on Repair Commented Mar 15, 2013 at 5:24
  • 1
    It is showing that your website is using framework 2.0 Try hosting it one more time and reset and restart all settings. Also refresh and restart the website after changing any settings. Commented Mar 15, 2013 at 5:25

11 Answers 11

17

This typically happens when you have an attribute of targetFramework="4.0" in the web.config but the App Pool is set to run ASP.NET 2.0. The targetFramework attribute is entirely unrecognized by ASP.NET 2.0 - so changing it to 2.0 won't have the desired effect.

Contact Support / Your Administrator and have the AppPool switched to 4.0.

You could also remove the attribute entirely, however if your site was coded with the 4.0 Framework, then I'm sure something else will cause an error as well.

Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive

Sign up to request clarification or add additional context in comments.

2 Comments

Yeah you got a point. But I'm the admin. I've tried that link already but seems no luck. See my updated question I've posted there the image of my IIS manager. It's seems my AppPool is already set to 4.0.
My issue was that while the AppPool was set to 4.0 the real issue was that 4.6.2 wasn't installed. After I installed 4.6.2 all is back to normal. HTH
10
+50

I was now able to find reason behind the error guys. It's on the webhosting site settings not on my app pool or what so ever. I changed the asp.net version from 2.0 to 4.0 but I forgot to click the update button. I feel so embarrased. :( I've been struggling for days to fix this error and only to found out its on the webhosting site settings. GgrrRR.. As of now I'm facing new error but has nothing to do with this question. Anyway thanks guys for your efforts to help me. :)

2 Comments

So the image above was not from your hosted showing 4.0? Doh, I though lt those were your server screenshots
Sorry its from the IIS Manager. The file manager in somee.com where Im uploading my files has different form and needs to set-up its settings manually. That's where I forgot to changed the asp.net version.
7

Try this, instead of selecting your websete's Application Pool to DefaultAppPool, select ASP.NET v4.0

Select your website in IIS => Basic Settings => Application Pool => Select ASP.NET v4.0

and you will be good to go. Hope it helps :)

Comments

1

Also try aspnet_regiis -u then aspnet_regiis -i on below path

C:\Windows\Microsoft.NET\Framework\v4.0.30319 

Now restart the IIS and check

Hope this will help !

3 Comments

thanks for your help. I tried you suggestion. But seems not working. Do I have to republish and reupload my data in the webhosting site after your suggestion?
No, republish is not required, but check for Framework selection in application pool one more time. Is it 4.0 integrated or not?
Yeah it is. Maybe there could be other reasons why I'm getting this error.
0

You could be using the 32 bit version, so you should prob try at the command line from the Framework (not Framework64) folder.

IE Did you try it from C:\Windows\Microsoft.NET\Framework\v4.0.30319 rather than the 64 version? If you ref 32 bit libs you can be forced to 32 bit version (some other reasons as well if I recall)

Is your site a child of another site in IIS?

For more details on this (since it applies to various types of apps running on .NET) see Scott's post at:

32-bit and 64-bit confusion around x86 and x64 and the .NET Framework and CLR

2 Comments

If I'll it do I have to re-publish / reupload my site? because when I tried it and just refreshed it doesnt work. Even if I'm using a 64bit OS is there a chance that I will be using a 32-bit version of Framework.? No this is the only site I'm publishing.
No shouldn't have to republish but if it still fails give it a try after or just change your web.config by adding a blank line at the end to force a recompile
0

Make sure that you are building your web app as "Any CPU". Right click your web project --> Properties --> Build --> and look for the "Platform Target". Choose "Any CPU" or play around with it.

Hope this helps!

Comments

0

Each individual Web App under an IIS Web Site can use a different App Pool.

Verify the App Pool assigned to your app (not just the root site per your pictures) is .NET 4.0 compatible:

  1. Expand Default Web Site
  2. Right click on ProjectPALS, choose 'Manage Application' then 'Advanced...'
  3. Observe the 'Application Pool' your app is running as under the site
  4. Change to another App Pool if neccessary

1 Comment

Thanks for your suggestion. It's set to DefaultAppPool which I'm using.
0

How are you running the application? Are you just hitting the website or are you building and running from within Visual Studio? If you are building and running you may want to tell it to use the local IIS web server. This would make sure it is using the App Pool you have set up to run with v4.0/integrated.

I am guessing that it is using the Visual Studio Development Server when running. This server is probably trying to run with the 2.0 framework. This then causes your error to be thrown.

Edit: To note, I normally just build my website application and then I attach to process w3wp when I want to debug. I do not use the publishing tool. Of course this means my local working directory is within the web root.

1 Comment

I'm already on the part that I'm uploading files on the web hosting site. Specifically on Somee.com. It works well in my localhost in IIS. When I'm trying to check my site on the internet it throws me that error. If I'm using Visual Studio Development Server how could I possibly changed that server? Could you please tell me the steps how are you publishing your site? thanks in advance. Because this could also be the reason.
0

Have you tried the aspnet_regiis tool to register .Net 4.0 for IIS? You can check more at msdn

4 Comments

Yeah I type this command in cmd cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319 then aspnet_regiis -ir but still it doesn't. :(
Could you try same thing with C:\windows\microsoft.net\framework\v4.0.30319? And Does it work under iis on your local machine?
yeah it works fine on my local machine only when I deploy it on the internet it gets that error. What you are suggesting is a 32bit OS I'm using 64 bit and that command is the same.
ah doh, I just realized I wrote a similar comment up top after yours here for the 32 bit version (I should've read the comments more carefully!), if it works please give Sergio the points, although by all means please read the ref'd link above.
0

My problem was solved that way:

Your username is probably restricted, You must grant full access to the user.

  1. Right Click on Project and select Properties
  2. Click on Tab Security
  3. Click Edit button
  4. Found Current User and Permission for User Allow Full Control

Comments

-1

If your application is 32 bit, and you want to deploy in a 64 bit machine, You need to set 'Enable 32 Bit Applications' property to 'True' in the application pool - advanced settings.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.