|
|
我在汽车之家上传图片,写了一个规则,发布报告保存成html格式后是这样的:
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
Autohome.Club.Web.Mvc.Controllers.GetController.UpImageAndWriteLogForSupportCros(Int32 CategoryId, String FileName, Int32 isma, String cros) +530
lambda_method(Closure , ControllerBase , Object[] ) +265
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +247
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +38
System.Web.Mvc.Async.<>c__DisplayClass3b.<BeginInvokeActionMethodWithFilters>b__35() +124
System.Web.Mvc.Async.<>c__DisplayClass51.<InvokeActionMethodFilterAsynchronously>b__4b() +452
System.Web.Mvc.Async.<>c__DisplayClass51.<InvokeActionMethodFilterAsynchronously>b__4b() +452
System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__38(IAsyncResult asyncResult) +15
System.Web.Mvc.Async.<>c__DisplayClass2c.<BeginInvokeAction>b__22() +31
System.Web.Mvc.Async.<>c__DisplayClass27.<BeginInvokeAction>b__24(IAsyncResult asyncResult) +230
System.Web.Mvc.<>c__DisplayClass19.<BeginExecuteCore>b__14(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +20
System.Web.Mvc.AsyncController.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +20
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__4(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +20
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +453
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +371
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
不知道这是怎么回事,希望能解答一下,写的规则如下:
[编码][/编码]
--------------------------------------------------------------------------------清除cookie
[清除Cookie][/清除Cookie]
[登录退出][/登录退出]
--------------------------------------------------------------------------------正式登录
[登录验证码]http://account.autohome.com.cn/ValidateCode/GetValidateCode?id=0.6575136499688048[/登录验证码]
[登录提交网址1]http://account.autohome.com.cn/Login/ValidIndex[/登录提交网址1]
[登录提交数据1]name={帐号}&pwd={密码}&validcode={登录验证码}&isauto=true&type=json&backurl=http%253a%252f%252fclub.autohome.com.cn%252fbbs%252fforum-c-3333-1.html&url=&[/登录提交数据1]
[登录成功特征1]{"success":1,===登陆成功了。。。[/登录成功特征1]
[登录失败特征1]{"success":0,===登陆失败了。。。[/登录失败特征1]
--------------------------------------------------------------------------------正式发布
[文件目录]D:\test\*.jpg[/文件目录]
[发布协议头1]Content-Type: multipart/form-data; boundary=----pluploadboundary1404959147906
[/发布协议头1]
[发布提交网址1]http://clubup.service.autohome.com.cn/get/UpImageAndWriteLogForSupportCros?cros=autohome.com.cn[/发布提交网址1]
[发布提交数据1]------pluploadboundary1404959147906
Content-Disposition: form-data; name="CategoryId"
0
------pluploadboundary1404959147906
Content-Disposition: form-data; name="isma"
0
------pluploadboundary1404959147906
Content-Disposition: form-data; name="name"
111.jpg
------pluploadboundary1404959147906
Content-Disposition: form-data; name="FileName"
111.jpg
------pluploadboundary1404959147906
Content-Disposition: form-data; name="file"; filename="111.jpg"
Content-Type: image/jpeg
{文件}
------pluploadboundary1404959147906--
[/发布提交数据1]
[发布成功特征1]document.domain = 'autohome.com.cn';</script>{"file":"userphotos===上传成功了。。。[/发布成功特征1]
[发布失败特征1][/发布失败特征1]
--------------------------------------------------------------------------------获取网址
[成功网址][/成功网址]
[网址库]{发布提交1参数1}[/网址库] |
|