473,791 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XmlSchemaExcept ion in App.config using UIP Application Block

Does anyone know why I might be getting an XmlSchemaExcept ion in App.config
configured as below to use the UIP Application Block?

I get the following error for every element, sub-element and attribute
within the <uipConfigurati on> element:

Message 1 Could not find schema information for the element
'uipConfigurati on'.
Message 2 Could not find schema information for the element 'objectTypes'.
Message 3 Could not find schema information for the element 'iViewManager'.
.... etc. etc.

My App.config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<configSections >
<section name="uipConfig uration"
type="Microsoft .ApplicationBlo cks.UIProcess.U IPConfigHandler ,
Microsoft.Appli cationBlocks.UI Process,
Version=1.0.1.0 ,
Culture=neutral ,
PublicKeyToken= null"
/>
</configSections>
<uipConfigurati on>
<objectTypes>
<iViewManager
name="WindowsFo rmViewManager"
type="Microsoft .ApplicationBlo cks.UIProcess.W indowsFormViewM anager,
Microsoft.Appli cationBlocks.UI Process,
Version=1.0.1.0 ,
Culture=neutral ,
PublicKeyToken= null"
/>
<state
name="TestState "
type="BusinessL ayer.TestState, BusinessLayer,
Version=null,
Culture=neutral ,
PublicKeyToken= null"
/>

<controller
name="TestContr oller"
type="Presentat ionLayer.Contro llers.TestContr oller,
SBMPresentation Layer,
Version=1.0.1.0 ,
Culture=neutral ,
PublicKeyToken= null"
/>
<statePersisten ceProvider
name="IsolatedS toragePersisten ce"
type="Microsoft .ApplicationBlo cks.UIProcess.I solatedStorageP ersistence,
Microsoft.Appli cationBlocks.UI Process,
Version=1.0.1.0 ,
Culture=neutral ,
PublicKeyToken= null"
/>
</objectTypes>
<views>
<view
name="TestView"
type="Presentat ionLayer.Views. TestView,
PresentationLay er,
Version=null,
Culture=neutral ,
PublicKeyToken= null"
controller="Tes tController"
stayOpen="true"
floatable="true "
/>

</views>
<!--
<sharedTransiti ons>
</sharedTransitio ns>
-->
<!--
<navigationGrap h>
</navigationGraph >
-->
<!--
<uipWizard>
</uipWizard>
-->
<!--
<userControls >
</userControls>
-->
</uipConfiguratio n>
<system.diagnos tics>
<sources>
<!-- This section defines the logging configuration for
My.Application. Log -->
<source name="DefaultSo urce" switchName="Def aultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the Application Event Log
-->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSw itch" value="Informat ion" />
</switches>
<sharedListener s>
<add name="FileLog"
type="Microsoft .VisualBasic.Lo gging.FileLogTr aceListener,
Microsoft.Visua lBasic, Version=8.0.0.0 , Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a, processorArchit ecture=MSIL"
initializeData= "FileLogWri ter"/>
<!-- Uncomment the below section and replace APPLICATION_NAM E with the
name of your application to write to the Application Event Log -->
<!--<add name="EventLog" type="System.Di agnostics.Event LogTraceListene r"
initializeData= "APPLICATION_NA ME"/> -->
</sharedListeners >
</system.diagnost ics>

</configuration>

Thanks
Mar 13 '06 #1
7 6868
These are validation errors, are you trying to validate your file or just
parse it. If you dont need validation, turn validation off when you create
the validating reader in .NET.

Zafar
"SparkPlug" <Sp*******@disc ussions.microso ft.com> wrote in message
news:50******** *************** ***********@mic rosoft.com...
Does anyone know why I might be getting an XmlSchemaExcept ion in App.config configured as below to use the UIP Application Block?

I get the following error for every element, sub-element and attribute
within the <uipConfigurati on> element:

Message 1 Could not find schema information for the element
'uipConfigurati on'.
Message 2 Could not find schema information for the element 'objectTypes'.
Message 3 Could not find schema information for the element 'iViewManager'. ... etc. etc.

My App.config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<configSections >
<section name="uipConfig uration"
type="Microsoft .ApplicationBlo cks.UIProcess.U IPConfigHandler ,
Microsoft.Appli cationBlocks.UI Process,
Version=1.0.1.0 ,
Culture=neutral ,
PublicKeyToken= null"
/>
</configSections>
<uipConfigurati on>
<objectTypes>
<iViewManager
name="WindowsFo rmViewManager"
type="Microsoft .ApplicationBlo cks.UIProcess.W indowsFormViewM anager,
Microsoft.Appli cationBlocks.UI Process,
Version=1.0.1.0 ,
Culture=neutral ,
PublicKeyToken= null"
/>
<state
name="TestState "
type="BusinessL ayer.TestState, BusinessLayer,
Version=null,
Culture=neutral ,
PublicKeyToken= null"
/>

<controller
name="TestContr oller"
type="Presentat ionLayer.Contro llers.TestContr oller,
SBMPresentation Layer,
Version=1.0.1.0 ,
Culture=neutral ,
PublicKeyToken= null"
/>
<statePersisten ceProvider
name="IsolatedS toragePersisten ce"
type="Microsoft .ApplicationBlo cks.UIProcess.I solatedStorageP ersistence,
Microsoft.Appli cationBlocks.UI Process,
Version=1.0.1.0 ,
Culture=neutral ,
PublicKeyToken= null"
/>
</objectTypes>
<views>
<view
name="TestView"
type="Presentat ionLayer.Views. TestView,
PresentationLay er,
Version=null,
Culture=neutral ,
PublicKeyToken= null"
controller="Tes tController"
stayOpen="true"
floatable="true "
/>

</views>
<!--
<sharedTransiti ons>
</sharedTransitio ns>
-->
<!--
<navigationGrap h>
</navigationGraph >
-->
<!--
<uipWizard>
</uipWizard>
-->
<!--
<userControls >
</userControls>
-->
</uipConfiguratio n>
<system.diagnos tics>
<sources>
<!-- This section defines the logging configuration for
My.Application. Log -->
<source name="DefaultSo urce" switchName="Def aultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the Application Event Log
-->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSw itch" value="Informat ion" />
</switches>
<sharedListener s>
<add name="FileLog"
type="Microsoft .VisualBasic.Lo gging.FileLogTr aceListener,
Microsoft.Visua lBasic, Version=8.0.0.0 , Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a, processorArchit ecture=MSIL"
initializeData= "FileLogWri ter"/>
<!-- Uncomment the below section and replace APPLICATION_NAM E with the
name of your application to write to the Application Event Log -->
<!--<add name="EventLog" type="System.Di agnostics.Event LogTraceListene r"
initializeData= "APPLICATION_NA ME"/> -->
</sharedListeners >
</system.diagnost ics>

</configuration>

Thanks

Mar 14 '06 #2

"Zafar Abbas" wrote:
These are validation errors, are you trying to validate your file or just
parse it. If you dont need validation, turn validation off when you create
the validating reader in .NET.


That sounds useful. I've only just begun creating an application based on
UIPAB so I am just trying to build & run it with one simple View and one
simple Controller to test that I have written the config correctly.

Is it trying to validate the config file but doesn't have access to the
schema? If so, how can I prevent Visual Studio (Express) from trying to
validate the app.config?

FYI the message in the Visual Studio Immediate Window is

A first chance exception of type 'System.Xml.Sch ema.XmlSchemaEx ception'
occurred in System.Xml.dll
A first chance exception of type
'System.Configu ration.Configur ationErrorsExce ption' occurred in
System.Configur ation.dll
A first chance exception of type
'Microsoft.Appl icationBlocks.U IProcess.UIPExc eption' occurred in
Microsoft.Appli cationBlocks.UI Process.dll

and the debugging process appears to be showing me the exception is being
thrown from a statement is the UIPConfigHandle r.cs that says:

validatingReade r.Schemas.Add( XmlSchema.Read( new XmlTextReader(
streamReader ), null ) );

Thanks for your help.

Mar 14 '06 #3
If the exception is thrown from the following line that means that there was
a problem in parsing and compiling the schema that is being added.

validatingReade r.Schemas.Add( XmlSchema.Read( new XmlTextReader(
streamReader ), null ) );

Can you write out the exception message and check the error in the schema?

Thanks,
Priya

"SparkPlug" <Sp*******@disc ussions.microso ft.com> wrote in message
news:9A******** *************** ***********@mic rosoft.com...

"Zafar Abbas" wrote:
These are validation errors, are you trying to validate your file or just
parse it. If you dont need validation, turn validation off when you
create
the validating reader in .NET.


That sounds useful. I've only just begun creating an application based on
UIPAB so I am just trying to build & run it with one simple View and one
simple Controller to test that I have written the config correctly.

Is it trying to validate the config file but doesn't have access to the
schema? If so, how can I prevent Visual Studio (Express) from trying to
validate the app.config?

FYI the message in the Visual Studio Immediate Window is

A first chance exception of type 'System.Xml.Sch ema.XmlSchemaEx ception'
occurred in System.Xml.dll
A first chance exception of type
'System.Configu ration.Configur ationErrorsExce ption' occurred in
System.Configur ation.dll
A first chance exception of type
'Microsoft.Appl icationBlocks.U IProcess.UIPExc eption' occurred in
Microsoft.Appli cationBlocks.UI Process.dll

and the debugging process appears to be showing me the exception is being
thrown from a statement is the UIPConfigHandle r.cs that says:

validatingReade r.Schemas.Add( XmlSchema.Read( new XmlTextReader(
streamReader ), null ) );

Thanks for your help.

Mar 15 '06 #4

"Priya Lakshminarayana n" wrote:
If the exception is thrown from the following line that means that there was
a problem in parsing and compiling the schema that is being added.
Yes I agree that is the problem.
validatingReade r.Schemas.Add( XmlSchema.Read( new XmlTextReader(
streamReader ), null ) );

Can you write out the exception message and check the error in the schema?


I am using only Visual Basic 2005 Express Edition and will not provide
exception stack traces for exceptions thrown in referenced C# code, the only
exception messages are in the Immediate Window and Error List as I described
previously and repost below:

Immediate Window:
A first chance exception of type 'System.Xml.Sch ema.XmlSchemaEx ception'
occurred in System.Xml.dll
A first chance exception of type
'System.Configu ration.Configur ationErrorsExce ption' occurred in
System.Configur ation.dll
A first chance exception of type
'Microsoft.Appl icationBlocks.U IProcess.UIPExc eption' occurred in
Microsoft.Appli cationBlocks.UI Process.dll
A first chance exception of type
'Microsoft.Appl icationBlocks.U IProcess.UIPExc eption' occurred in
Microsoft.Appli cationBlocks.UI Process.dll
A first chance exception of type
'Microsoft.Appl icationBlocks.U IProcess.UIPExc eption' occurred in
Microsoft.Appli cationBlocks.UI Process.dll
....

.... ad nauseam

Error List:
Message 1 Could not find schema information for the element
'uipConfigurati on'.
Message 2 Could not find schema information for the element 'objectTypes'.
Message 3 Could not find schema information for the element 'iViewManager'.
....

.... etc. for every element and attribute in the <uipConfigurati on> section

I currently think that the process of upgrading the UIP solution to Visual
C# 2005 EE (I only have Express Editions at home) has caused a problem so
that the UIPConfigSchema .xsd is not being correctly built into the
UIProcess.dll.

This screen image may indicate that but I'm not sure:
http://uk.geocities.com/mjtech_uk/UI...udio2005EE.jpg

I am currently asking a friend to try building the UIPAB on VS 2003 with
..NET 1.1 to see that solves the problem. I will post the results on this
thread but would welcome any comments/insights/suggestions in the meantime.

Thanks.

Mar 15 '06 #5


"SparkPlug" wrote:

I am using only Visual Basic 2005 Express Edition and will not provide
exception stack traces for exceptions thrown in referenced C# code,


Oops, that should have said "I am using only Visual Basic 2005 Express
Edition and *it* will not provide exception stack traces for exceptions
thrown in referenced C# code"

If *it* gave me an exception report I would gladly pass it on!!! :-)
Mar 15 '06 #6
Can you try a smaller code sample by adding the UIP schema directly into a
XmlSchemaSet and check what errors/exception you get?

XmlSchemaSet schemas = new XmlSchemaSet();
schemas.Add(nul l, "UipConfigSchem a.xsd");
schemas.Compile ();

Thanks,
Priya

"SparkPlug" <Sp*******@disc ussions.microso ft.com> wrote in message
news:4F******** *************** ***********@mic rosoft.com...


"SparkPlug" wrote:

I am using only Visual Basic 2005 Express Edition and will not provide
exception stack traces for exceptions thrown in referenced C# code,


Oops, that should have said "I am using only Visual Basic 2005 Express
Edition and *it* will not provide exception stack traces for exceptions
thrown in referenced C# code"

If *it* gave me an exception report I would gladly pass it on!!! :-)

Mar 17 '06 #7

"Priya Lakshminarayana n" wrote:
Can you try a smaller code sample by adding the UIP schema directly into a
XmlSchemaSet and check what errors/exception you get?

XmlSchemaSet schemas = new XmlSchemaSet();
schemas.Add(nul l, "UipConfigSchem a.xsd");
schemas.Compile ();


Sorry for the delay in replying. I did as you advised and the exception
message is below.

System.Xml.Sche ma.XmlSchemaExc eption was unhandled
Message="Wildca rd '##any' allows element 'statePersisten ceProvider', and
causes the content model to become ambiguous. A content model must be formed
such that during validation of an element information item sequence, the
particle contained directly, indirectly or implicitly therein with which to
attempt to validate each item in the sequence in turn can be uniquely
determined without examining the content or attributes of that item, and
without any information about the items in the remainder of the sequence."
Source="System. Xml"
StackTrace:
at System.Xml.Sche ma.XmlSchemaSet .InternalValida tionCallback(Ob ject
sender, ValidationEvent Args e)
at
System.Xml.Sche ma.BaseProcesso r.SendValidatio nEvent(XmlSchem aException e,
XmlSeverityType severity)
at System.Xml.Sche ma.Compiler.Com pileElement(Xml SchemaElement xe)
at
System.Xml.Sche ma.Compiler.Com pileParticleEle ments(XmlSchema ComplexType
complexType, XmlSchemaPartic le particle)
at
System.Xml.Sche ma.Compiler.Com pileParticleEle ments(XmlSchema ComplexType
complexType, XmlSchemaPartic le particle)
at
System.Xml.Sche ma.Compiler.Com pileComplexType Elements(XmlSch emaComplexType
complexType)
at System.Xml.Sche ma.Compiler.Com pile()
at System.Xml.Sche ma.Compiler.Exe cute(XmlSchemaS et schemaSet,
SchemaInfo schemaCompiledI nfo)
at System.Xml.Sche ma.XmlSchemaSet .Compile()
at UIPAB_Sandbox.M ainClass.Main(S tring[] args) in D:\Visual Studio
2005\Projects\U IPAB_Sandbox\UI PAB_Sandbox\Mai nClass.vb:line 13
at System.AppDomai n.nExecuteAssem bly(Assembly assembly, String[] args)
at System.AppDomai n.ExecuteAssemb ly(String assemblyFile, Evidence
assemblySecurit y, String[] args)
at Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem bly()
at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object state)
at System.Threadin g.ExecutionCont ext.Run(Executi onContext
executionContex t, ContextCallback callback, Object state)
at System.Threadin g.ThreadHelper. ThreadStart()
I have also identified a forum thread that appears to address this problem
(explained as something to do with .NET 2.0 handling XML differently to .NET
1.1 which the UIPAB was built on) and offers a solution at
http://forums.asp.net/713774/ShowPost.aspx

Implementing the solution prevents the original exception.

I would still welcome your comments or insights regarding this issue.

Hopefully, one day soon this *important* application block will be properly
ported to the .NET 2.0 Framework (how about it, Microsoft?!!)

Mar 20 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1925
by: Mike | last post by:
Hi I am using one of the Microsoft building blocks called User Interface Process what this block basically does it control the flow/state of your application. This block works great with Win/Web forms due to the fact that the flow of your application is added to the app.config file. The problem I have is that I need to call the block from another DLL and it seems to as if app.config files are note supported in DLL solutions. I do not...
1
571
by: Jorge Besada | last post by:
I am planning on using the Configuration Management Application Block. The Block reads the app.config file the first time it is used. What if I want to add a new section/configSection and have the ConfigurationManager class reload the new app.config settings. Can this be done? I am not interested in having my application be notified that the settings file it is using has been changed. I am interested in reinitializing the...
4
7880
by: grs | last post by:
Can a class library have a app.config file. Reason for asking is that the microsoft application blocks all read from myApp.exe.config. How can you use the application blocks if you do not have an app.config file. Wish someone from microsoft would answer this, I am at a loss. thanks grs
2
1812
by: matthew.schneider | last post by:
I have a defined XML Schema, and XML documents containing data that I validate against it. Periodically, I will have a data document that will contain extra elements that are not part of my schema. The powers that be have determined that this is acceptable. I am looking for the best way to continue to validate my documents against my schema, but ignore any errors dealing with extra elements. My first thought is to use a...
1
4246
by: Craig Beuker | last post by:
Hello, I am experimenting with this XmlValidatingReader and have a question about how it is working (or not working as would be the case) The sample documents and code are included at the end of the post. I am using VS.net 2003, .Net 1.1, Win2k Server I have a simple schema and a simple XML document.
5
2937
by: who be dat? | last post by:
Hello all. I'm writing an application that is writing trace information that can be viewed in trace.axd. I would like to rename this and use a different name specific to my application. I know the name of this is set in machine.config. I was hoping it would be possible to change this in web.config. I got it to work, kind of. Good news is I can change the name in my web.config file. Bad news is that trace.axd still works meaning I can...
6
10494
by: theWizard1 | last post by:
Using VisualStudio 2005, asp.net 2.0: What do I put in my Web.Config to avoid hard coding the: myserveraddress.com? The following shows how I have hard coded it without having the value in the we.config, and it works. However, I would like to place it in my web.config file, and then just get the value from the web.config? Can someone tell me what I need to add to the web.config
1
3621
by: probashi | last post by:
I need to store username and password in my windows application app.config file, from my application I am communicating to an external system (CICS). I believe, one of my options is to encrypt this in config file and decrypt this inside my application using SymmetricAlgorithm (System.Security.Cryptography). My question is where should I store the key for encryption and decryption. My application needs to know this for decryption and...
1
3319
by: Harold Howe | last post by:
When .NET loads an app.config at runtime (myapp.exe.config), will it honor an entity declaration? Based on what I am seeing, the answer is no, but I think, or hope, that I am doing something wrong. I tried this: // myapp.exe.config <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE configuration >
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4109
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.