473,407 Members | 2,676 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.

best place to put .xsd for deployment?

I have .asmx that uses .xsd schema to validate an incoming xml string and
spits out transformations.
Basically I am wondering where to put the .xsd schema and how to get to it
at run-time.

I tried
vReader.Schemas.Add(null, "test.xsd");

and it reports that it could not find C:\WINDOWS\system32\test.xsd. Then I
tried using,

Assembly.GetExecutingAssembly().CodeBase

and it returned c:\inetpub\wwwroot\bin\MyAssembly.DLL - almost there. Then
I just chopped off the dll name and appended my xsd to it, resulting in
c:\inetpub\wwwroot\bin\test.xsd.

I mean this works but I was wondering if there is a better way. Should I
embedded it in my dll? Or what's a better approach so that the client does
not have access to the schema file?

Thanks
Nov 12 '05 #1
5 4421
Why not refer to the schema by a Url?

vReader.Schemas.Add(null, http://myuri/schemas/test.xsd);

Other than that use Server.MapPath()

vReader.Schemas.Add(null, Server.MapPath("test.xsd"));

Doesn't look like you're doing that yet.

Steven
Founder, http://venturetogether.com
"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:O0**************@TK2MSFTNGP11.phx.gbl...
I have .asmx that uses .xsd schema to validate an incoming xml string and
spits out transformations.
Basically I am wondering where to put the .xsd schema and how to get to it
at run-time.

I tried
vReader.Schemas.Add(null, "test.xsd");

and it reports that it could not find C:\WINDOWS\system32\test.xsd. Then I tried using,

Assembly.GetExecutingAssembly().CodeBase

and it returned c:\inetpub\wwwroot\bin\MyAssembly.DLL - almost there. Then I just chopped off the dll name and appended my xsd to it, resulting in
c:\inetpub\wwwroot\bin\test.xsd.

I mean this works but I was wondering if there is a better way. Should I
embedded it in my dll? Or what's a better approach so that the client does not have access to the schema file?

Thanks

Nov 12 '05 #2
I could but like I said, what if I didn't want the user to have access to
the .xsd file necessarily?
What would you do then?

Just looking for some ideas.
Thanks.

"Steven Livingstone" <s.***********@nospam.btinternet.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Why not refer to the schema by a Url?

vReader.Schemas.Add(null, http://myuri/schemas/test.xsd);

Other than that use Server.MapPath()

vReader.Schemas.Add(null, Server.MapPath("test.xsd"));

Doesn't look like you're doing that yet.

Steven
Founder, http://venturetogether.com
"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:O0**************@TK2MSFTNGP11.phx.gbl...
I have .asmx that uses .xsd schema to validate an incoming xml string and spits out transformations.
Basically I am wondering where to put the .xsd schema and how to get to it at run-time.

I tried
vReader.Schemas.Add(null, "test.xsd");

and it reports that it could not find C:\WINDOWS\system32\test.xsd. Then
I
tried using,

Assembly.GetExecutingAssembly().CodeBase

and it returned c:\inetpub\wwwroot\bin\MyAssembly.DLL - almost there.

Then
I just chopped off the dll name and appended my xsd to it, resulting in
c:\inetpub\wwwroot\bin\test.xsd.

I mean this works but I was wondering if there is a better way. Should

I embedded it in my dll? Or what's a better approach so that the client

does
not have access to the schema file?

Thanks


Nov 12 '05 #3
Use XmlResolver and protect the Xml file :)

http://sightkeys.com?183

Steven
Founder, http://venturetogether.com

"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:#R**************@TK2MSFTNGP10.phx.gbl...
I could but like I said, what if I didn't want the user to have access to
the .xsd file necessarily?
What would you do then?

Just looking for some ideas.
Thanks.

"Steven Livingstone" <s.***********@nospam.btinternet.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Why not refer to the schema by a Url?

vReader.Schemas.Add(null, http://myuri/schemas/test.xsd);

Other than that use Server.MapPath()

vReader.Schemas.Add(null, Server.MapPath("test.xsd"));

Doesn't look like you're doing that yet.

Steven
Founder, http://venturetogether.com
"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:O0**************@TK2MSFTNGP11.phx.gbl...
I have .asmx that uses .xsd schema to validate an incoming xml string and spits out transformations.
Basically I am wondering where to put the .xsd schema and how to get to
it
at run-time.

I tried
vReader.Schemas.Add(null, "test.xsd");

and it reports that it could not find C:\WINDOWS\system32\test.xsd. Then
I
tried using,

Assembly.GetExecutingAssembly().CodeBase

and it returned c:\inetpub\wwwroot\bin\MyAssembly.DLL - almost there. Then
I just chopped off the dll name and appended my xsd to it, resulting

in c:\inetpub\wwwroot\bin\test.xsd.

I mean this works but I was wondering if there is a better way.

Should I embedded it in my dll? Or what's a better approach so that the client

does
not have access to the schema file?

Thanks



Nov 12 '05 #4
Thanks! I'll look into it and let you know how it goes.

"Steven Livingstone" <s.***********@nospam.btinternet.com> wrote in message
news:uK****************@TK2MSFTNGP11.phx.gbl...
Use XmlResolver and protect the Xml file :)

http://sightkeys.com?183

Steven
Founder, http://venturetogether.com

"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:#R**************@TK2MSFTNGP10.phx.gbl...
I could but like I said, what if I didn't want the user to have access to
the .xsd file necessarily?
What would you do then?

Just looking for some ideas.
Thanks.

"Steven Livingstone" <s.***********@nospam.btinternet.com> wrote in

message
news:%2****************@tk2msftngp13.phx.gbl...
Why not refer to the schema by a Url?

vReader.Schemas.Add(null, http://myuri/schemas/test.xsd);

Other than that use Server.MapPath()

vReader.Schemas.Add(null, Server.MapPath("test.xsd"));

Doesn't look like you're doing that yet.

Steven
Founder, http://venturetogether.com
"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:O0**************@TK2MSFTNGP11.phx.gbl...
> I have .asmx that uses .xsd schema to validate an incoming xml string
and
> spits out transformations.
> Basically I am wondering where to put the .xsd schema and how to get

to
it
> at run-time.
>
> I tried
> vReader.Schemas.Add(null, "test.xsd");
>
> and it reports that it could not find C:\WINDOWS\system32\test.xsd.

Then
I
> tried using,
>
> Assembly.GetExecutingAssembly().CodeBase
>
> and it returned c:\inetpub\wwwroot\bin\MyAssembly.DLL - almost

there. Then
> I just chopped off the dll name and appended my xsd to it, resulting

in > c:\inetpub\wwwroot\bin\test.xsd.
>
> I mean this works but I was wondering if there is a better way.

Should
I
> embedded it in my dll? Or what's a better approach so that the client does
> not have access to the schema file?
>
> Thanks
>
>



Nov 12 '05 #5
I read on the topic of XmlResolver and it sounds like a good thing. But I
guess it all comes down to how to store the password securely. I mean I
guess you probably don't want to hard-code the password so you'd probably
read it off of a config file and proper steps must be taken to make sure
that the config file is secured.

What other options are available?
Thanks much.

"Steven Livingstone" <s.***********@nospam.btinternet.com> wrote in message
news:uK****************@TK2MSFTNGP11.phx.gbl...
Use XmlResolver and protect the Xml file :)

http://sightkeys.com?183

Steven
Founder, http://venturetogether.com

"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:#R**************@TK2MSFTNGP10.phx.gbl...
I could but like I said, what if I didn't want the user to have access to
the .xsd file necessarily?
What would you do then?

Just looking for some ideas.
Thanks.

"Steven Livingstone" <s.***********@nospam.btinternet.com> wrote in

message
news:%2****************@tk2msftngp13.phx.gbl...
Why not refer to the schema by a Url?

vReader.Schemas.Add(null, http://myuri/schemas/test.xsd);

Other than that use Server.MapPath()

vReader.Schemas.Add(null, Server.MapPath("test.xsd"));

Doesn't look like you're doing that yet.

Steven
Founder, http://venturetogether.com
"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:O0**************@TK2MSFTNGP11.phx.gbl...
> I have .asmx that uses .xsd schema to validate an incoming xml string
and
> spits out transformations.
> Basically I am wondering where to put the .xsd schema and how to get

to
it
> at run-time.
>
> I tried
> vReader.Schemas.Add(null, "test.xsd");
>
> and it reports that it could not find C:\WINDOWS\system32\test.xsd.

Then
I
> tried using,
>
> Assembly.GetExecutingAssembly().CodeBase
>
> and it returned c:\inetpub\wwwroot\bin\MyAssembly.DLL - almost

there. Then
> I just chopped off the dll name and appended my xsd to it, resulting

in > c:\inetpub\wwwroot\bin\test.xsd.
>
> I mean this works but I was wondering if there is a better way.

Should
I
> embedded it in my dll? Or what's a better approach so that the client does
> not have access to the schema file?
>
> Thanks
>
>



Nov 12 '05 #6

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

Similar topics

48
by: Bulba! | last post by:
I'll soon start development of a specialized small app and need to choose GUI for it. I have narrowed the choice to wxPython/PythonCard and QT/PyQT (buying commercial licenses is not a big...
1
by: Binoy | last post by:
Hello, I am new to .NET, so if my questions is dumb, please excuse me. We are moving our ASP model site to ASP.NET and I would like to know the best deployment strategy that we can use (we...
6
by: Vagif Abilov | last post by:
We decided to adopt .NET coding guidelines posted by Brad Abrams from Microsoft: http://blogs.msdn.com/brada/archive/2005/01/26/361369.aspx Here is what Brad (and AFAIK Microsoft) suggests...
1
by: ThunderMusic | last post by:
Hi, I want to know if there is a place to learn about Setup Projects, because I'm trying to make one but can't do the things I want to do, like add a registry key or allow the user to...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
2
by: robert | last post by:
Like many people I am inconvenienced by the fact that files cannot be excluded from an asp.net application. I basically have some text files that are written to by the application and these files...
4
by: Steve | last post by:
When I create a new project in 2005, and I go to save the project files, vb.net displays a dialog box that repeats the name of the application and has a checkbox if I want to create a new directory...
3
by: gordon | last post by:
Hi I am looking to store some details about a user's configuration choices, in particular the place where they have installed some data files, the OS that they use, and their Windows user name. ...
20
by: Joe | last post by:
Is any one charting packing considered to be the "best"? We've used ChartFX but wasn't too happy about the way data had to be populated along with some other issues which slip my mind right now and...
2
by: Ing. Davide Piras | last post by:
Hi there, we are rewriting our .NET 1.1 web application with VS. 2005 and .NET 2.0, it takes big work but we believe there is a point to do that... at least we hope! we believe that: 1) the...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.