HttpContext不起作用 [英] HttpContext not working

查看:101
本文介绍了HttpContext不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HttpContext无法在辅助角色Auzure中工作.如何在辅助角色文件夹窗口auzure中找到文件.

 字符串 pathToParentFolder = System.Web.HttpContext.Current.Server.MapPath(Fulfillments); 



问候
库玛亲王
软件开发人员

代码格式为

解决方案

辅助角色可以在Web上下文之外使用,因此HTTPContext无效,除非将其传递给角色实现.

HttpContext not working in Worker Role Auzure . How can i found a file in worker role folder window auzure.

string pathToParentFolder =System.Web.HttpContext.Current.Server.MapPath(Fulfillments);



Regards
Prince Kumar
Software Developer

Edit: Code formatted

解决方案

A Worker Role can be used outside of a web context so an HTTPContext is not valid unless you pass it to the role implementation.


这篇关于HttpContext不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆