Resources problem with the Jobs-Intermediate sample.
Hello,
I used the Jobs-Intermediate module in a sample website.
It works fine as long as I don't reset IIS or change something in the module.
If i do, I get an error message as if the JobsResources was not registered :
"
Hi F,
Can you please let us know what is the start up method of your custom module? It seems that when the application is restarted the resources are not properly registered. Can you please try with OnApplicationStart?
Kind regards,
Radoslav Georgiev
the Telerik team
Hi,
Has anyone figured out this issue? I am having the same problem. When the module was initally installed it worked correctly. When I rebuilt the application and cause the web app to restart, the resources error explained previously appeared. What do you mean when you say have the resources registered in OnApplicationStart? Is that a method that you override in the custom module? I've read in other form threads and documentation that resources should be registered in the Custom module's Initialize method by calling Res.RegisterResource<CustomModule>(). Is that not entirely correct?
Thanks for your help,
Bobby
Here is some more information. I see there are two threads related to the same issue, So, I am responding to both threads. http://www.sitefinity.com/devnet/forums/sitefinity-4-x/sdk/jobs-module-resources-error.aspx
Hi all,
I am experiencing the same issues as Ancuta Me. It seems like on the application restart my resource is not getting registered properly after rebuilding the custom module. Before I did the rebuild, I set a breakpoint in the intialize method of my custom module to make sure my resource was registered. Everything worked fine. Then I added a space to the markup and rebuilt the custom module. I deployed my custom module .dll to the bin directory of the web app. I added a space to the web.config and saved the file to force a restart of the web app. Then an error message gets thrown. Like I said earlier, I called
Res
.RegisterResource<CustomModule>(), in the initialize method as stated in this thread.
So, my question is how do resources get loaded on a web app restart. Because, I have a breakpoint set in a static constructor for my custom module and that break point never gets hit. The exception is thrown before it hits my breakpoint. Any help is appreciated.
Thanks,
Bobby
Hi all,
I have managed to clear up my issues but I have not pinpointed the root cause of my original problem. The only difference that I noticed between my old module and the Jobs Module was the following two items. The first item is the following method:
private
void InstallCustomVirtualPaths(SiteInitializer initialzer)
var
virtualPathConfig = initialzer.Context.GetConfig<VirtualPathSettingsConfig>();
var questionTemplatesModuleVirtualPathConfig = new VirtualPathElement(virtualPathConfig.VirtualPaths)
VirtualPath = Jobs
Module.VirtualPath + "*",
ResolverName =
"EmbeddedResourceResolver",
ResourceLocation =
"Jobs"
;
if (!virtualPathConfig.VirtualPaths.ContainsKey(QuestionTemplatesModule.VirtualPath + "*"))
virtualPathConfig.VirtualPaths.Add(questionTemplatesModuleVirtualPathConfig);
public
override void Install(SiteInitializer initializer)
base.Install(initializer);
this.InstallCustomVirtualPaths(initializer);