我的应用程序使用HttpWebRequest"Put"方法将文件上传到iis7中托管的asp.net应用程序.我有一个错误状态代码405方法不允许.我已经试过了,我可以在论坛中发现2天,包括去除处理WebDAV的所有解决方案,将"放"的方法进入处理程序(如发现http://blogs.msdn.com/b/joseph_fultz/存档/ 2009/07/23 /使最把动词与-处理器和-IIS-7-0.aspx),重新注册asp.net到IIS.但在我的案例中,没有一个解决方案可行.
我在iis中运行Failed Request Tracing,以下是错误:
MODULE_SET_RESPONSE_ERROR_STATUS
ModuleName StaticFileModule
Notification 128
HttpStatus 405
HttpReason Method Not Allowed
HttpSubStatus 0
ErrorCode 2147942401
ConfigExceptionInfo
Notification EXECUTE_REQUEST_HANDLER
ErrorCode Incorrect function. (0x80070001)
MODULE_SET_RESPONSE_ERROR_STATUS
Warning
ModuleName="StaticFileModule", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="405", HttpReason="Method Not Allowed", HttpSubStatus="0", ErrorCode="Incorrect function
Run Code Online (Sandbox Code Playgroud)
任何帮助都非常感谢.谢谢.我的asp.net应用程序/表单是使用Visual Studio 2008开发并在iis 7中发布的.
---------------------------------------更新
处理HttpWebRequest(PUT)的代码如下:它使用了用户身份验证令牌并对其进行了验证.之后,它创建了一个身份验证票证并回复给用户.
tokenSignature = false;
//To capture the tokenId
string MainString = Request.Headers.ToString();
int FirstChr = MainString.IndexOf("*=");
MainString = MainString.Substring(FirstChr + 2);
int secondChr = MainString.IndexOf("%");
tokenId = MainString.Substring(0, secondChr);
//to Write the received encrypted …Run Code Online (Sandbox Code Playgroud) 我有一个pandas数据帧如下:
user_id product_id order_number
1 1 1
1 1 2
1 1 3
1 2 1
1 2 5
2 1 1
2 1 3
2 1 4
2 1 5
3 1 1
3 1 2
3 1 6
Run Code Online (Sandbox Code Playgroud)
我想查询这个df的最长条纹(没有跳过order_number)和最后一条条纹(自上一个order_number以来).
理想的结果如下:
user_id product_id longest_streak last_streak
1 1 3 3
1 2 0 0
2 1 3 3
3 1 2 0
Run Code Online (Sandbox Code Playgroud)
我很欣赏这方面的任何见解.