I have an MVC2 application where i post a DELETE to MyController/Delete/ID.
This is working fine if I debug the application, however, when I put it on the application server (IIS6), I keep "Unauthorized" as a result. I googled a lot, but I didn't find any problems the same as mine.
I do not understand what the point of the answer is. As far as I know, it has to be an MVC2 application, for the "delete" thingy to work. For your information, I post the delete like this (javascript):
var request = new Sys.Net.WebRequest();
request.set_httpVerb("DELETE");
request.set_url(action);
request.add_completed(deleteCompleted);
request.invoke();
Action is something like: "/Drawing/MyController/Delete/5" for deleting item 5 via the MyController controller. "Drawing" is my virtual directory.
The controller is like this:
[AcceptAjax]
[HttpDelete]
[HttpGet]
public ActionResult Delete(int parentID, string ids){..}
I am sure you must have set the correct ASP.NET version in IIS manager.
Apart from this how did you deploy your application to IIS 6?
Did you use any of these four:
a) Configure routes to use the .aspx extension
b) Configure routes to use a custom extension (such as .mvc)
c) Use a wildcard mapping with selective disabling
d) URL rewriting
Michielvv
Member
1 Points
9 Posts
MVC2 delete action IIS6
Dec 15, 2010 11:22 AM|LINK
Hi all,
I have an MVC2 application where i post a DELETE to MyController/Delete/ID.
This is working fine if I debug the application, however, when I put it on the application server (IIS6), I keep "Unauthorized" as a result. I googled a lot, but I didn't find any problems the same as mine.
Any ideas? Thanks,
Michiel
iis6 mvc2
ignatandrei
All-Star
135174 Points
21682 Posts
Moderator
MVP
Re: MVC2 delete action IIS6
Dec 15, 2010 11:29 AM|LINK
If you put a "Hello world" asp.net web application, is the same?
Michielvv
Member
1 Points
9 Posts
Re: MVC2 delete action IIS6
Dec 15, 2010 11:40 AM|LINK
I do not understand what the point of the answer is. As far as I know, it has to be an MVC2 application, for the "delete" thingy to work. For your information, I post the delete like this (javascript):
var request = new Sys.Net.WebRequest(); request.set_httpVerb("DELETE"); request.set_url(action); request.add_completed(deleteCompleted); request.invoke();Action is something like: "/Drawing/MyController/Delete/5" for deleting item 5 via the MyController controller.
"Drawing" is my virtual directory.
The controller is like this:
[AcceptAjax] [HttpDelete] [HttpGet] public ActionResult Delete(int parentID, string ids){..}sachingusain
Star
8786 Points
1702 Posts
Re: MVC2 delete action IIS6
Dec 15, 2010 11:41 AM|LINK
I am sure you must have set the correct ASP.NET version in IIS manager.
Apart from this how did you deploy your application to IIS 6?
Did you use any of these four:
a) Configure routes to use the .aspx extension
b) Configure routes to use a custom extension (such as .mvc)
c) Use a wildcard mapping with selective disabling
d) URL rewriting
If yes, then which one and how did you do it.
Thanks.
Michielvv
Member
1 Points
9 Posts
Re: MVC2 delete action IIS6
Dec 15, 2010 12:07 PM|LINK
I tried with .mvc, this didn't work, allthough I added .mvc to the webserver, with the "All verbs" option checked.
ignatandrei
All-Star
135174 Points
21682 Posts
Moderator
MVP
Re: MVC2 delete action IIS6
Dec 15, 2010 12:27 PM|LINK
and uncheck " verify file exist"?
Michielvv
Member
1 Points
9 Posts
Re: MVC2 delete action IIS6
Dec 15, 2010 12:39 PM|LINK
Did that..
ignatandrei
All-Star
135174 Points
21682 Posts
Moderator
MVP
Re: MVC2 delete action IIS6
Dec 15, 2010 01:01 PM|LINK
I want to ensure that asp.net is properly configured on the system. Please verify if a "Hello World" asp.net application works.
Michielvv
Member
1 Points
9 Posts
Re: MVC2 delete action IIS6
Dec 15, 2010 01:10 PM|LINK
The application works fine, just the delete thing doesn't.
sachingusain
Star
8786 Points
1702 Posts
Re: MVC2 delete action IIS6
Dec 15, 2010 02:08 PM|LINK
Can you post your routing information from global.asax?
Thanks.