473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Strnage behaviour using personalined section in web.config

According to the possibility of use custom section that must follow a precise
schema, I've implemented my own one. The problem is with the compiler, that
when start to debug my application hang up on the line of the web.config
telling me that the rule aren't stricly followed, but unfortunately it doesn't
say me where the error is located.

The strange thing is that using the schema in design-time, the schema works
fine; for instance I've implemented a multiple-element parameter that is
displayed correctly as well as the
required or optional ones. For what I know, when a schema isn't well formed,
the intellisene doesn't work at all, but in my case it works. Also parsing
the schema and the web.config with the on-line tool available on http://www.gotdotnet.com/team/xmltools/,
the schema results valid. But on F5 press ... Ta-daaaaaaaaaaaaaaa

By the way, here is the code I'm using ... I hope in some useful help.

<configuration>
<configSections>
<section name="FileUploaderSection" type="WebMA.Web.FileUploader.FileUploaderSection"/>
</configSections>

<FileUploaderSection xmlns="http://tempuri.org/FileUploaderDef.xsd">
<allowedFiles>
<Item bufferSize="1024" destPath="\public" fileName="default.aspx"
extension="*"
abortOnError="false" contentType="text/plain"/>
<Item bufferSize="1024" destPath="public" fileName="default1.aspx"
/>
<Item bufferSize="1024" destPath="public" fileName="default2.aspx"
/>
<Item bufferSize="1024" destPath="public" fileName="default3.aspx"
/>
</allowedFiles>
</FileUploaderSection>

e questo è il mio schema.

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="FileUploaderSection" targetNamespace="http://tempuri.org/FileUploaderDef.xsd"

elementFormDefault="qualified" xmlns="http://tempuri.org/FileUploaderDef.xsd"

xmlns:mstns="http://tempuri.org/FileUploaderDef.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="allowedFiles">
<xs:complexType>
<xs:sequence>
<xs:element name="Item" type="mstns:singleItem" minOccurs="1"
maxOccurs="unbounded"
/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:complexType name="singleItem">
<xs:sequence />
<xs:attribute .......>
...........
</xs:attribute>
</xs:complexType>
</xs:schema>

Bye
Andrea


Jan 30 '06 #1
0 874

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

Similar topics

3
by: mrquan83 | last post by:
I'm using Nini from http://nini.sourceforge.net to read and write XML files. I'm having trouble creating nested 'configs' (Sections) however. This is a sample of my code.... ----- vb.net...
0
by: Paul Buckley | last post by:
Hi, I'm trying to gain access to a configuration section from within an assembly that has been loaded using Assemly.Load(byte). There is one main exe (lets say myApp.exe) and one config file...
0
by: Paul Buckley | last post by:
Hi, I'm trying to gain access to a configuration section from within an assembly that has been loaded using Assemly.Load(byte). There is one main exe (lets say myApp.exe) and one config file...
4
by: Paul Buckley | last post by:
Hi, I'm trying to gain access to a configuration section from within an assembly that has been loaded using Assemly.Load(byte). There is one main exe (lets say myApp.exe) and one config file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.