File does not exist

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
11/7/2012 3:22:02 AM
Gravatar
Total Posts 10

File does not exist

The file '/Admin/Controls/TabGalleryTypeSetting.ascx' does not exist.

 

i get this exception in ModuleSettings.aspx.cs on this line Control uc = Page.LoadControl(s.ControlSrc);

but i have defined this

<featureSetting
resourceFile="TabGalleryResource"
resourceKey="resTipSetting"
defaultValue="1"
controlType="ISettingControl"
controlSrc="Controls/TabGalleryTypeSetting.ascx"
sortOrder="110"
regexValidationExpression=""
/>

Stack trace:

at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)
at System.Web.UI.TemplateControl.LoadControl(VirtualPath virtualPath)
at System.Web.UI.TemplateControl.LoadControl(String virtualPath)
at mojoPortal.Web.AdminUI.ModuleSettingsPage.AddSettingControl(CustomModuleSetting s, Panel groupPanel) in C:\Users\jelicdzivo\Desktop\MojoSource\mojoportal\Web\Admin\ModuleSettings.aspx.cs:line 511
at mojoPortal.Web.AdminUI.ModuleSettingsPage.PopulateCustomSettings() in C:\Users\jelicdzivo\Desktop\MojoSource\mojoportal\Web\Admin\ModuleSettings.aspx.cs:line 395
at mojoPortal.Web.AdminUI.ModuleSettingsPage.OnInit(EventArgs e) in C:\Users\jelicdzivo\Desktop\MojoSource\mojoportal\Web\Admin\ModuleSettings.aspx.cs:line 100
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Can you help thx

11/7/2012 3:48:00 AM
Gravatar
Total Posts 10

Re: File does not exist

when i change my post build event it works 

Before 

xcopy /s /y /d "$(ProjectDir)Controls\*.ascx" "$(SolutionDir)Web\Controls\"

After

xcopy /s /y /d "$(ProjectDir)Controls\*.ascx" "$(SolutionDir)Web\Admin\Controls\"

but can you tell why i have to copy it there.

thx,

Dzivo Jelic

11/7/2012 10:23:02 AM
Gravatar
Total Posts 18439

Re: File does not exist

Hi,

If you look at how the included features work they don't do that, within the project all the files are in a sub folder and that sub folder is created beneath Web. I don't recommend copying things directly into the root folder nor into the Admin folder.

For example the WebStore.UI project has all its files in a sub folder named WebStore not directly in the root of the project and the post build event keeps thos files together in Web/WebStore

xcopy /s /y /d "$(ProjectDir)bin\WebStore.UI.dll" "$(SolutionDir)Web\bin\"
xcopy /s /y /d "$(ProjectDir)bin\WebStore.Business.dll" "$(SolutionDir)Web\bin\"
xcopy /s /y /d "$(ProjectDir)bin\WebStore.Data.dll" "$(SolutionDir)Web\bin\"
xcopy /s /y /d "$(ProjectDir)WebStore\*.aspx" "$(SolutionDir)Web\WebStore\"
xcopy /s /y /d "$(ProjectDir)WebStore\*.ashx" "$(SolutionDir)Web\WebStore\"
xcopy /s /y /d "$(ProjectDir)WebStore\*.ascx" "$(SolutionDir)Web\WebStore\"
xcopy /s /y /d "$(ProjectDir)WebStore\Controls\*.ascx" "$(SolutionDir)Web\WebStore\Controls\"
xcopy /s /y /d "$(ProjectDir)App_GlobalResources\*.resx" "$(SolutionDir)Web\App_GlobalResources\"
xcopy /s /y /d "$(ProjectDir)Setup\*" "$(SolutionDir)Web\Setup\"
xcopy /s /y /d "$(ProjectDir)Data\*" "$(SolutionDir)Web\Data"
xcopy /s /y /d "$(ProjectDir)WebStore\OrderCompletedHandlers\*" "$(SolutionDir)Web\WebStore\OrderCompletedHandlers\"

and the featureDefinition also points to the module within the folder:

<featureDefinition
featureGuid="0cefbf18-56de-11dc-8f36-bac755d89593"
supportedDatabases="MSSQL,MySQL"
resourceFile="WebStoreResources"
featureNameReasourceKey="WebStoreName"
controlSource="WebStore/WebStoreModule.ascx"
...

I recommend you follow the same pattern in your cuastom feature and keep as much of your files together in a folder as possible.

Hope that helps,

Joe

11/8/2012 5:08:14 AM
Gravatar
Total Posts 10

Re: File does not exist

thx Joe

You must sign in to post in the forums. This thread is closed to new posts.