StrataFrame Forum

XML file name is not a supported file name

http://forum.strataframe.net/Topic13451.aspx

By GRocchi - 1/15/2008

Hi,
after some editing in the Role Based Security Editor SecurityDialog from within tha applicaton, the following error occurs during Application initialization:

NotSupportedException
  The given XML file name is not a supported file name.

Source     : MicroFour StrataFrame Base

Stack Trace:
   in
MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Assembly
ContainingAssembly, String FullPath)
   in
MicroFour.StrataFrame.Application.StrataFrameApplication.LoadLocalizatio
nFromAssembly(Assembly LoadedAssembly)
   in
MicroFour.StrataFrame.Application.StrataFrameApplication.RunApplication(
)
   in SPS.Explorer.AppMain.Main() in C:\Documents and
Settings\TitoBrasolin\Documenti\Progetti\SPS\src\SPS.Explorer\AppMain.vb
:riga 26
   in System.AppDomain._nExecuteAssembly(Assembly assembly, String[]
args)
   in System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
   in System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
   in System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
   in
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationCon
text activationContext, String[] activationCustomData)
   in
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationCon
text activationContext)
   in
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZo
ne()
   in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   in System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
   in System.Threading.ThreadHelper.ThreadStart()

By StrataFrame Team - 1/15/2008

Do you have any .XML files that are embedded in your application?  It looks like the system is trying to load an XML file that was embedded within one of the assemblies and the name is not in the proper format to be one of the XML files.
By GRocchi - 1/15/2008

Hi Ben,

as you cab see on stack trace, it seems that SF is looking for some kind of localization resource. Remember that the application is using ITALIAN language (1040). The application starts correctly the first time in debug mode, then all the next times it presents the error reported and refuses to start.

Any idea?

By Trent L. Taylor - 1/15/2008

The language should not make a difference.  What is the name of the file that you are including in the application?  Also, did you set the XMl to be embedded instead of Content?  Finally, what is on line 26 of your AppMain.vb file?
By GRocchi - 1/15/2008

We finally set the point. The code that parses the application manifest searches for string containing "message" or "messages" and, if found, try to load the resource. A reference added to the project contains a "MessageType.xml" indication that SF code try to load without success. A NotSupportedException is fired. Maybe the parsing algorithm should be a bit more precise in locating SF resources.
By Trent L. Taylor - 1/16/2008

A NotSupportedException is fired. Maybe the parsing algorithm should be a bit more precise in locating SF resources.

We can add an underscore to the search.  We look for "message*.xml" ... so I could see how that caused a problem.  Glad you got it figured out.