Verbs Are Ignored And Treated As GETs?
Jul 21, 2010
I'm attempting to configure a webdav server example application [URL] to run on IIS6 (Win2003 Server). The application runs correctly on my dev machine (Win7, IIS7.5). When I attempt to map a drive to the DAV share, several requests are issued, including one OPTIONS request and two PROPFIND requests. In Fiddler, I see that these are transmitted correctly. However, the response is always the content of the default page on the site. If I look at the IIS logs, the requests are logged as GETs instead of OPTIONS or PROPFIND. UrlScan is disabled, but I went ahead and added OPTIONS and PROPFIND to the list of allowed verbs (since I'm running out of ideas).
View 1 Replies
Similar Messages:
Feb 27, 2011
There are few verbs that we see in HTTP , like GET , POST , OPTIONS ..ETC ." my question is how to use the verbs while I am using my browser ... or do I have any option to use them?
View 2 Replies
Mar 22, 2010
After the release of MVC 2, i have started to check and play with the new features. But i couldnt understand that why do i need to use PUT or DELETE verbs? I have searched about it and read some articles but i couldnt get it. What is the main purpose of DELETE and PUT (and do they have any advantages rather than using a GET or POST method) even though i can handle all of the requests with GET and POST.
View 5 Replies
Feb 11, 2011
I have a restful controller that has your standard REST HTTP Verbs: Get,Post, Put, Delete. The problem I am having is that although my controllers are decorated to accept these verbs, when I execute my REST action, it can only hit my Get and Post methods. I have the attributes on top of the controller actions: HttPut, HttpDelete, HttpPost, and HttpGet. I also have the the override method in my forms: @Html.HttpMethodOverride(HttpVerbs.Put) When I submit my form, I get a 404 error from IIS 7.5, saying the static file handler couldn't find the resource. Strangely the same forms work in Cassini, so I think it is something in IIS7.5's setup.
What do I need to do to get IIS 7.5 to handle REST verbs like PUT and DELETE with Asp.Net MVC 3? I have already removed WebDAV and have looked through the handlers but the ones I am modifying seem to do nothing. My current setup is Asp.Net MVC 3, IIS7.5 on Windows 7.
View 1 Replies
Aug 13, 2010
I have an MHTML file which has embedded images. The MHTML is generated on the server and then I will typically deliver the file using a BinaryWrite. I've also tried Server.Transfer, Response.Write after converting to ASCII and writing the file to disk and using a Response.WriteFile. In any of these cases the resulting file is not (it appears) treated as an mht file. For setting the image, I've tried Content-ID and Content-Location. The image URL shows up as cid:example1 when viewed in IE8. When opening up the file after saving to disk it shows up as mhtml:file://C:Documents and Settings enjynitoDesktopoutput634172401776447258.mht!cid:example1. Or while browsing with one of the methods that work you get [URL]
The Output.MimeType is message/rfc822. I've also tried application/octet-stream and multipart/related. Writing the file to disk and using a Response.Redirect works. Accessing the file with a direct URL works. Saving the file to disk and then opening the file works. It seems IE is assuming an HTML result to the request and not deciphering the new content type. But you can do things like this for dynamic style sheets, scripts, etc... so I don't really believe that. I couldn't see any glaring differences. I just tried and the BinaryWrite works fine in Opera. If I absolutely have to worry about writing to a temporary directory and then redirecting to the file I will. I was just hoping to avoid having to clean up the temporary files. Is what I want to do not possible? An example of writing the file is below.
if (response != null && response.Output != null)
{
Response.Clear();
Response.AddHeader("Content-Type", response.Output.MimeType);
Response.AddHeader("Content-Disposition", "attachment;filename=output" + DateTime.UtcNow.Ticks.ToString(CultureInfo.InvariantCulture) + "." + response.Output.Extension);
// Response.Write( System.Text.Encoding.ASCII.GetString(response.Output.Bytes));
Response.BinaryWrite(response.Output.Bytes);
//Response.Clear();
//Server.Transfer("/ISV/Forms/Test/output634172397522707394.mht");
//Response.Clear();
//Response.WriteFile( Server.MapPath("/ISV/Forms/Test/output634172397522707394.mht"));
Response.Flush();
Response.End();
View 1 Replies
Jan 12, 2010
I am little bit confuse with Asp.net MVC Area.
When we talk about WebForms we say, for Administrative tasks, you must have an Admin folder to separate the admin task.
In MVC how i will treat my Admin tasks?
I will go for Admin Area or Admin Controllers,
Because if i will write controller for Admin tasks, each and every task will be written in one controller (AdminController) or if i will write Area -> Controller, means i will need to write at-least two controllers for each feature.
Second if we breaks the application in Areas (as modules) how i will manage Admin task for each Area.
View 1 Replies
Feb 12, 2011
I was following a MSDN walkthrough [URL] which is a very simple ASP.NET example with Visual Studio 2010:
·
I have a simple database table with a timestamp column;
·
I created a "Linq to SQL Class", and drag the table from Server Explorer onto it;
·
I dragged a LinqDataSource onto the web page and pointed it to the dbml;
·
I dragged a DetailsView onto the web page using the LinqDataSource.
·
I enabled editing on the data source.
When I run, the time stamp column is also displayed on the DetailsView as something like "AAAAAAAAB9Y=". Then, when I change the "EmployeeName" and update, I got following exception: Failed to set one or more properties on type person. Cannot convert value of parameter 'tstamp' from 'System.String' to 'System.Data.Linq.Binary'. I was strictly following the MSDN walkthrough. I tried multiple times, I even installed Visual Studio 2010 SP1 Beta. But it consistently through this exception. Can someone shed some light on this? Not a encouraging start form someone thinking to learn the lastest Microsoft stuff!
I was following a MSDN walkthrough, which is a very simple ASP.NET website with Visual Studio 2010: I have a simple database table with a timestamp column;I created a "Linq to SQL Class", and drag the table from Server Explorer onto it;I dragged a LinqDataSource onto the web page and pointed it to the dbml;I dragged a DetailsView onto the web page using the LinqDataSource.I enabled editing on the data source.When I run, the time stamp column is also displayed on the DetailsView as something like "AAAAAAAAB9Y=".Then, when I change the "EmployeeName" and update, I got following exception: Failed to set one or more properties on type person. Cannot convert value of parameter 'tstamp' from 'System.String' to 'System.Data.Linq.Binary'. I was strictly following the MSDN walkthrough. Can someone shed some light on this? Not a encouraging start form someone thinking to learn the lastest Microsoft stuff!dfsaf
View 1 Replies
Dec 9, 2010
I've got a details view control, default set to Insert which I've added file upload controls. I've used a button to begin the upload process and add the other data to the database. The weird thing is that if I use FireFox to enter the data and upload the files, everything works fine but it works slightly differently in IE8. The difference is that when I browse for a file in FireFox, upload it and store the file name, it returns just the file name e.g. myPic.jpg. However, when I upload with IE8 it stores the entire route to the file e.g. C:/Users/Users/Site/myPic.jpg Why would a browser treat these things differently? And, is there a way to fix it to work on both browsers?
View 2 Replies