Showing posts with label path. Show all posts
Showing posts with label path. Show all posts

Wednesday, March 28, 2012

Trouble creating New Project on localhost...

I want to create a new ASP.Net project on this path in Visual
Basic.Net:

"http://localhost/WEB3.Theorie"

I configured the 'WEB3.theorie' folder so that my ASP.Net account can
access it...
But I always get the same error >
-- http/1.1 500 Internal Server Error --

I still don't see what I've done wrong, but this IIS-stuff is rather
complex for me...
I know this could be a noobie situation, but I have to start
somewhere...

..mishcozii-sanI am having this exact same problem right now, but I am still waiting for a
solution. I am using Visual Studio 2005 vb Standard with IIS 5.1.

".mishcozii" wrote:

> I want to create a new ASP.Net project on this path in Visual
> Basic.Net:
> "http://localhost/WEB3.Theorie"
> I configured the 'WEB3.theorie' folder so that my ASP.Net account can
> access it...
> But I always get the same error >>
> -- http/1.1 500 Internal Server Error --
> I still don't see what I've done wrong, but this IIS-stuff is rather
> complex for me...
> I know this could be a noobie situation, but I have to start
> somewhere...
> ..mishcozii-san
>

Trouble creating New Project on localhost...

I want to create a new ASP.Net project on this path in Visual
Basic.Net:
"http://localhost/WEB3.Theorie"
I configured the 'WEB3.theorie' folder so that my ASP.Net account can
access it...
But I always get the same error >>
-- http/1.1 500 Internal Server Error --
I still don't see what I've done wrong, but this IIS-stuff is rather
complex for me...
I know this could be a noobie situation, but I have to start
somewhere...
.mishcozii-sanI am having this exact same problem right now, but I am still waiting for a
solution. I am using Visual Studio 2005 vb Standard with IIS 5.1.
".mishcozii" wrote:

> I want to create a new ASP.Net project on this path in Visual
> Basic.Net:
> "http://localhost/WEB3.Theorie"
> I configured the 'WEB3.theorie' folder so that my ASP.Net account can
> access it...
> But I always get the same error >>
> -- http/1.1 500 Internal Server Error --
> I still don't see what I've done wrong, but this IIS-stuff is rather
> complex for me...
> I know this could be a noobie situation, but I have to start
> somewhere...
> ..mishcozii-san
>

Thursday, March 22, 2012

Trouble with paths in Style Sheets

Consider the following style declaration in a stylesheet:


background-image: url('path/to/image');

That's really all I'm trying to accomplish, but I'm running into difficulties using Visual Studio 2005 on my ASP page.

The problem is that I'm unable to find a good way to refer to the "document root" within those 'url' attributes in the stylesheet. I understand I could use the '~' mark, in an asp.net control, to refer to the document root, but it doesn't work within the 'url' declaration in a stylesheet. Also, simply using '/' doesn't work, since that ends up referring to a directory much higher up in the directory structure, something like my C: drive.


The solutions I've found are to do something like "url(../path/to/images)". That works, but it's ugly, and I'd like to base the paths on the document root, not the directory my stylesheet happens to be in.


I can also include the entire full path to the image directory, relative to my C: drive, but that's even worse, and it won't work once the site is published.

So, is there a "DOCUMENT_ROOT" type of value I can use, or can I set the document root behavior for a given website in Visual Studio?

Thanks.

Have you tried background-image: url('/path/to/image');? I think just having the first slash will take it to the docuemnt root. I could be wrong though.


Having just the first slash doesn't work. I'm not sure where the "/" brings it, but I think it's probably going back to the root of my hard drive. In either case, it's not finding the proper path that way.

It comes down to there being a disconnect between the way web pages function (where "/" should bring you to the root of the site) and the way Visual Studio treats things (where "/" seems to bring it to the filesystem room, instead of the root for that particular website/project.

Is there a way to convince Visual Studio to see "/" as the root for that website, instead of some place further up the directory structure?


this may not be useless to remind that relative pathes in external stylesheet MUST be RELATIVE to the very CSS file itself. (Obvious since the same css file can be linked by many remote pages)therefore url(../path/to/images) is not so ugly ;-)Using absolute path, one can try to concatenate with Request.ApplicationPath & "path/to/image/"...

With Request.ApplicationPath, I think that would only work in a .aspx file, not in a .css file, but I'll see if it does anything.


hum... using aspx for css file would prevent the web designer to edit it. I would rather have the css file next to the image directory and use relative path into the css. the page only needs to know wher the css is.

It turns out all I needed to do was to modify the "Virtual Path" property on the website, to "/" instead of "/MySiteName". The reason I didn't notice this was because I didn't have SP1 installed, and it's not available in the normal, installed version.

Thanks for the suggestions.

Tuesday, March 13, 2012

Troubles in .cs compile with unc type oledb connections strings..

I have an .cs file I need to compile with csc.exe for codebehind
access (no VS.NET). Trouble is that my oledb connection needs to use
a unc type path.. when I use the unc path in conn I get
escape sequence errors from csc.exe.. so I tried a static
mapped drive with reversed \ / from a google I found. The
.cs compiles but the conn doesn't work.. so if I can find
a method to get unc style conn to compile, I think I would be
golden. It's a known working oledb conn used all over the place
in standard asp and aspx files.. any clues into getting the
escape sequences corrected would be appreciated.. here
is what the conn would looks like of the .cs
"Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir; ServerTy
pe=ADS_REMOTE_SERVER;
TableType=ADS_CDX;FilterOptions=RESPECT_
WHEN_COUNTING;"
Thanks, BobIn a C# string, backslashes are escape characters. To escape a backslash,
escape it with a backslash.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.
"Bob [BVP]" <bb4@.pmount.com> wrote in message
news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
> I have an .cs file I need to compile with csc.exe for codebehind
> access (no VS.NET). Trouble is that my oledb connection needs to use
> a unc type path.. when I use the unc path in conn I get
> escape sequence errors from csc.exe.. so I tried a static
> mapped drive with reversed \ / from a google I found. The
> .cs compiles but the conn doesn't work.. so if I can find
> a method to get unc style conn to compile, I think I would be
> golden. It's a known working oledb conn used all over the place
> in standard asp and aspx files.. any clues into getting the
> escape sequences corrected would be appreciated.. here
> is what the conn would looks like of the .cs
> "Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir;
> ServerType=ADS_REMOTE_SERVER;
> TableType=ADS_CDX;FilterOptions=RESPECT_
WHEN_COUNTING;"
> Thanks, Bob
>
Thanks.. If I have \\server\share it would be \\\\server\\share ?
"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
news:udIvrMz$EHA.2196@.TK2MSFTNGP14.phx.gbl...
> In a C# string, backslashes are escape characters. To escape a backslash,
> escape it with a backslash.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> Neither a follower nor a lender be.
> "Bob [BVP]" <bb4@.pmount.com> wrote in message
> news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
>

Troubles in .cs compile with unc type oledb connections strings..

I have an .cs file I need to compile with csc.exe for codebehind
access (no VS.NET). Trouble is that my oledb connection needs to use
a unc type path.. when I use the unc path in conn I get
escape sequence errors from csc.exe.. so I tried a static
mapped drive with reversed \ / from a google I found. The
..cs compiles but the conn doesn't work.. so if I can find
a method to get unc style conn to compile, I think I would be
golden. It's a known working oledb conn used all over the place
in standard asp and aspx files.. any clues into getting the
escape sequences corrected would be appreciated.. here
is what the conn would looks like of the .cs

"Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir; ServerType=ADS_REMOTE_SERVER;
TableType=ADS_CDX;FilterOptions=RESPECT_WHEN_COUNT ING;"

Thanks, BobIn a C# string, backslashes are escape characters. To escape a backslash,
escape it with a backslash.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Bob [BVP]" <bb4@.pmount.com> wrote in message
news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
> I have an .cs file I need to compile with csc.exe for codebehind
> access (no VS.NET). Trouble is that my oledb connection needs to use
> a unc type path.. when I use the unc path in conn I get
> escape sequence errors from csc.exe.. so I tried a static
> mapped drive with reversed \ / from a google I found. The
> .cs compiles but the conn doesn't work.. so if I can find
> a method to get unc style conn to compile, I think I would be
> golden. It's a known working oledb conn used all over the place
> in standard asp and aspx files.. any clues into getting the
> escape sequences corrected would be appreciated.. here
> is what the conn would looks like of the .cs
> "Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir;
> ServerType=ADS_REMOTE_SERVER;
> TableType=ADS_CDX;FilterOptions=RESPECT_WHEN_COUNT ING;"
> Thanks, Bob
Thanks.. If I have \\server\share it would be \\\\server\\share ?

"Kevin Spencer" <kevin@.DIESPAMMERSDIEtakempis.com> wrote in message
news:udIvrMz$EHA.2196@.TK2MSFTNGP14.phx.gbl...
> In a C# string, backslashes are escape characters. To escape a backslash,
> escape it with a backslash.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> Neither a follower nor a lender be.
> "Bob [BVP]" <bb4@.pmount.com> wrote in message
> news:uzkZyQy$EHA.1296@.TK2MSFTNGP10.phx.gbl...
> > I have an .cs file I need to compile with csc.exe for codebehind
> > access (no VS.NET). Trouble is that my oledb connection needs to use
> > a unc type path.. when I use the unc path in conn I get
> > escape sequence errors from csc.exe.. so I tried a static
> > mapped drive with reversed \ / from a google I found. The
> > .cs compiles but the conn doesn't work.. so if I can find
> > a method to get unc style conn to compile, I think I would be
> > golden. It's a known working oledb conn used all over the place
> > in standard asp and aspx files.. any clues into getting the
> > escape sequences corrected would be appreciated.. here
> > is what the conn would looks like of the .cs
> > "Provider=Advantage OLE DB Provider; Data Source=\\server\path\dir;
> > ServerType=ADS_REMOTE_SERVER;
> > TableType=ADS_CDX;FilterOptions=RESPECT_WHEN_COUNT ING;"
> > Thanks, Bob

Troubles with using a user control

Im using a Top Navigation Bar Web control in my application.
This Bar uses Images. Im trying to dynalically assign the relative URL
path as image path. That is, a particular image can have src attribute
as "../../images" or "images/" etc based on a public property of
control, callingDepth. This property is set in control delaration in
aspx page.
Im using src="http://pics.10026.com/?src=<% #fixRelPath("Images/med_upper_left1.gif") %> function
call in the ASPx pages.
The problem is that this function is not at all called all through page
load.
Any Clue on what i'm missing.
Thanks for Help.Expressions surrounded by <% # and %> are evaluated when the control
is DataBound. So you need to call the DataBind on the object, or a
container of that object.
For more info on DataBinding Expressions, see
http://www.dotnetjunkies.com/quicks...atabinding.aspx

Troubles with using a user control

Im using a Top Navigation Bar Web control in my application.
This Bar uses Images. Im trying to dynalically assign the relative URL
path as image path. That is, a particular image can have src attribute
as "../../images" or "images/" etc based on a public property of
control, callingDepth. This property is set in control delaration in
aspx page.
Im using src="http://pics.10026.com/?src=<% #fixRelPath("Images/med_upper_left1.gif") %> function
call in the ASPx pages.
The problem is that this function is not at all called all through page
load.
Any Clue on what i'm missing.
Thanks for Help.Expressions surrounded by <% # and %> are evaluated when the control
is DataBound. So you need to call the DataBind on the object, or a
container of that object.

For more info on DataBinding Expressions, see
http://www.dotnetjunkies.com/quicks...atabinding.aspx