![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#31
| |||
| |||
|
|
Hello Doug, Thanks for your reply. I did trouble shoot the whole day and figured out the root case. The Server.MapPath call use the following code to return the correct path context.Request.MapPath(path); The context object is not available because this object is only available when ASPNET process an ASPX page. When the page an ASPX page is unloaded, the context object is deleted. In your case, this website is not always used. The aspx page will be unloaded if there is no request for long time. So, there is no context object when GlobalAsax.RefreshCache_M calls MapPath(). "Server operation is not available in this context." exception was thrown. To resolve this issue, I suggest you write the absolute file path in Web.config file, rather than call MapPath() method in FillCach_M method. Would you please try this method and let me know if this resolves the issue. I'm glad to assist you. Have a great day. Best regards, Wen Yuan Microsoft Online Community Support ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#32
| |||
| |||
|
|
Hello Doug, Thanks for your reply. I did trouble shoot the whole day and figured out the root case. The Server.MapPath call use the following code to return the correct path context.Request.MapPath(path); The context object is not available because this object is only available when ASPNET process an ASPX page. When the page an ASPX page is unloaded, the context object is deleted. In your case, this website is not always used. The aspx page will be unloaded if there is no request for long time. So, there is no context object when GlobalAsax.RefreshCache_M calls MapPath(). "Server operation is not available in this context." exception was thrown. To resolve this issue, I suggest you write the absolute file path in Web.config file, rather than call MapPath() method in FillCach_M method. Would you please try this method and let me know if this resolves the issue. I'm glad to assist you. Have a great day. Best regards, Wen Yuan Microsoft Online Community Support ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#33
| |||
| |||
|
|
Hello Doug, Thanks for your reply. I did trouble shoot the whole day and figured out the root case. The Server.MapPath call use the following code to return the correct path context.Request.MapPath(path); The context object is not available because this object is only available when ASPNET process an ASPX page. When the page an ASPX page is unloaded, the context object is deleted. In your case, this website is not always used. The aspx page will be unloaded if there is no request for long time. So, there is no context object when GlobalAsax.RefreshCache_M calls MapPath(). "Server operation is not available in this context." exception was thrown. To resolve this issue, I suggest you write the absolute file path in Web.config file, rather than call MapPath() method in FillCach_M method. Would you please try this method and let me know if this resolves the issue. I'm glad to assist you. Have a great day. Best regards, Wen Yuan Microsoft Online Community Support ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#34
| |||
| |||
|
#35
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |