Ashallar
Ashallar

Reputation: 1030

Web application - Parser error - Could not load type

I have a Web application that is my REST API. I have integrated an OWIN authentication server, to do so, i :

I tested my application locally and everything works fine. I published my web application on Azure and when the publication is finished and i'm redirected to the url, i get the following error:

enter image description here

What's strange is that the 'Source File' in which the error occurs is '/global.asax', which is deleted.. (Note that i published the API on Azure before with the Global.asax, but the new publish should overwrite everything)

I tried to clean/rebuild, deleted bin and obj and then re-publish, but i keep getting the error. I also verified that the Global.asax was properly deleted which is the case.

Do you have any clue ?

Upvotes: 0

Views: 519

Answers (1)

Joey Cai
Joey Cai

Reputation: 20067

I followed your steps and reproduced your problem.

Note that i published the API on Azure before with the Global.asax

As you have said, you publish the API with Global.asax before, but when you republish it only overwrites the files you have changed.

When I delete the Global.asax locally and republish app, it still shows in the KUDU.

enter image description here

So I suggest that you could delete the Global.asax in KUDU.

Or when you publish your application, click "Remove additional files at destination".

enter image description here

Then your application will work fine.

Upvotes: 3

Related Questions