Showing posts with label creating. Show all posts
Showing posts with label creating. Show all posts

Monday, March 26, 2012

Permalink Structure

I have been creating a personal blog engine for the last couple of ws
because I am tired of using WordPress and I don't have a SQL server
back-end. I have successfully created a working URL rewriting engine
(via Global.asax) that cleans illegal characters from the post title,
uses Regular Expressions to grab the entryID (ie 13), rewrite the path
(entry.aspx?entryID=13).
My current permalink structure is as follows:
root/blog/testing-post-example-00013.aspx
I have noticed that some blog engines have the following schemas for
their permalink structures:
root/blog/testing-post-example/00013.aspx
I have tried to create this structure programmatically with the
following code:
string EntryTitle = "testing-post-example";
string PermaLink = EntryTitle + "/" + "000" + EntryID + ".aspx";
When I try to run this I get the error that the file can't be found,
obviously. There must be a way to create this link structure without
having to physically create the directories. I can't imagine that all
of these bloggers login and create a directory for each post and place a
"showEntry.aspx" file in there.
Any suggestions?
- Will
*** Sent via Developersdex http://www.examnotes.net ***Nevermind!
Original RewritePath
httpContext.RewritePath("entry.aspx?entryID=" + pageID);
New RewritePath
httpContext.RewritePath("/entry.aspx?entryID=" & pageID)
No wonder it was FILE NOT FOUND (enry.aspx). Instead of looking in the
root directory (actual location) for entry.aspx it was looking for
entry.aspx in the dynamically created "directory" folder.
*** Sent via Developersdex http://www.examnotes.net ***

Permalinks

Hello,

I am creating a simple Asp.Net Blog system. All blog posts have an ID which is an unique identifier (a GUID).

Now I wanna create permalinks. What format should I use? How can I do this?

Could someone, please, help me out?

Thanks,

Miguel

What's a permalink and what is it supposed to do?

Hi,

A permalink is a redefinition of the url in an easier way for a user to read or identify it.

Check http://en.wikipedia.org/wiki/Permalink

For example a blog post with such an url:

http://www.mydomain.com/post.aspx?id=398179823223

would become something like:

http://www.mydomain.com/<4 digit year>/<2 digit month>/<2 digit day>/<article name>/

This would show the post with id=398179823223

I don't know exactly how to implement this in my ASP.NET web site.

Thanks,

Miguel


Hi,

A permalink is a redefinition of the url in an easier way for a user to read or identify it.

Check http://en.wikipedia.org/wiki/Permalink

For example a blog post with such an url:

http://www.mydomain.com/post.aspx?id=398179823223

would become something like:

http://www.mydomain.com/<4 digit year>/<2 digit month>/<2 digit day>/<article name>/

This would show the post with id=398179823223

I don't know exactly how to implement this in my ASP.NET web site.

Thanks,

Miguel


Hi shapper,

Forgive me cuz i'm not familiar with this "permanent link" and what i suggested may be wrong. I searched thru the internet and found the following informaton. i hope it can be helpful to solve your problems anyway.

"With Ajaxium it is easy to construct permanent links which guide exactly to the page opened. So if the ASP.NET page is accessible for the visitor by a link, it is just as accessible when Ajaxium is enabled." (Orignial Article see:http://www.ajaxium.com/ajax-critique.aspx) So, could you try to impliment it using AJAX?

Hope my suggestion helps . thanks :)

Permalinks

Hello,
I am creating a simple Asp.Net Blog system. All blog posts have an ID
which is an unique identifier (a GUID).
Now I wanna create permalinks. What format should I use? How can I do
this?
Could someone, please, help me out?
Thanks,
MiguelTry :
http://en.wikipedia.org/wiki/Permalink and especially the "Popular permalink
formats" chapter.
This is likely most often done suign URL rewriting :
http://en.wikipedia.org/wiki/URL_rewriting
Patrice
"shapper" <mdmoura@.gmail.com> a crit dans le message de news:
1177340457.202371.125940@.l77g2000hsb.googlegroups.com...
> Hello,
> I am creating a simple Asp.Net Blog system. All blog posts have an ID
> which is an unique identifier (a GUID).
> Now I wanna create permalinks. What format should I use? How can I do
> this?
> Could someone, please, help me out?
> Thanks,
> Miguel
>
Hi,
Patrice wrote:
> Try :
> http://en.wikipedia.org/wiki/Permalink and especially the "Popular permali
nk
> formats" chapter.
> This is likely most often done suign URL rewriting :
> http://en.wikipedia.org/wiki/URL_rewriting
Why sue URL rewriting? What did it do to you? :-)
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Depending on the format used it can be a convenient way to map the permalink
to the actual page. For example the OP could parse all year/month/title.aspx
permalinks so that they all map to a default.aspx?id=someid request...
"Laurent Bugnion, MVP" <galasoft-lb@.bluewin.ch> a crit dans le message de
news: %23tbhMkjhHHA.4588@.TK2MSFTNGP02.phx.gbl...
> Hi,
> Patrice wrote:
> Why sue URL rewriting? What did it do to you? :-)
> Laurent
> --
> Laurent Bugnion [MVP ASP.NET]
> Software engineering, Blog: http://www.galasoft-LB.ch
> PhotoAlbum: http://www.galasoft-LB.ch/pictures
> Support children in Calcutta: http://www.calcutta-espoir.ch
Hi,
Patrice wrote:
> Depending on the format used it can be a convenient way to map the permali
nk
> to the actual page. For example the OP could parse all year/month/title.as
px
> permalinks so that they all map to a default.aspx?id=someid request...
Yes. I was trying to make a joke *S* Nevermind!
Greetings,
Laurent

> "Laurent Bugnion, MVP" <galasoft-lb@.bluewin.ch> a crit dans le message de
> news: %23tbhMkjhHHA.4588@.TK2MSFTNGP02.phx.gbl...
>
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch

Permalinks

Hello,

I am creating a simple Asp.Net Blog system. All blog posts have an ID
which is an unique identifier (a GUID).

Now I wanna create permalinks. What format should I use? How can I do
this?

Could someone, please, help me out?

Thanks,

MiguelTry :
http://en.wikipedia.org/wiki/Permalink and especially the "Popular permalink
formats" chapter.

This is likely most often done suign URL rewriting :
http://en.wikipedia.org/wiki/URL_rewriting
--
Patrice

"shapper" <mdmoura@.gmail.coma crit dans le message de news:
1177340457.202371.125940@.l77g2000hsb.googlegroups. com...

Quote:

Originally Posted by

Hello,
>
I am creating a simple Asp.Net Blog system. All blog posts have an ID
which is an unique identifier (a GUID).
>
Now I wanna create permalinks. What format should I use? How can I do
this?
>
Could someone, please, help me out?
>
Thanks,
>
Miguel
>


Hi,

Patrice wrote:

Quote:

Originally Posted by

Try :
http://en.wikipedia.org/wiki/Permalink and especially the "Popular permalink
formats" chapter.
>
This is likely most often done suign URL rewriting :
http://en.wikipedia.org/wiki/URL_rewriting


Why sue URL rewriting? What did it do to you? :-)

Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Depending on the format used it can be a convenient way to map the permalink
to the actual page. For example the OP could parse all year/month/title.aspx
permalinks so that they all map to a default.aspx?id=someid request...

"Laurent Bugnion, MVP" <galasoft-lb@.bluewin.cha crit dans le message de
news: %23tbhMkjhHHA.4588@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Hi,
>
Patrice wrote:

Quote:

Originally Posted by

>Try :
>http://en.wikipedia.org/wiki/Permalink and especially the "Popular
>permalink formats" chapter.
>>
>This is likely most often done suign URL rewriting :
>http://en.wikipedia.org/wiki/URL_rewriting


>
Why sue URL rewriting? What did it do to you? :-)
>
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch


Hi,

Patrice wrote:

Quote:

Originally Posted by

Depending on the format used it can be a convenient way to map the permalink
to the actual page. For example the OP could parse all year/month/title.aspx
permalinks so that they all map to a default.aspx?id=someid request...


Yes. I was trying to make a joke *S* Nevermind!

Greetings,
Laurent

Quote:

Originally Posted by

>
"Laurent Bugnion, MVP" <galasoft-lb@.bluewin.cha crit dans le message de
news: %23tbhMkjhHHA.4588@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

>Hi,
>>
>Patrice wrote:

Quote:

Originally Posted by

>>Try :
>>http://en.wikipedia.org/wiki/Permalink and especially the "Popular
>>permalink formats" chapter.
>>>
>>This is likely most often done suign URL rewriting :
>>http://en.wikipedia.org/wiki/URL_rewriting


>Why sue URL rewriting? What did it do to you? :-)
>>
>Laurent
>--
>Laurent Bugnion [MVP ASP.NET]
>Software engineering, Blog: http://www.galasoft-LB.ch
>PhotoAlbum: http://www.galasoft-LB.ch/pictures
>Support children in Calcutta: http://www.calcutta-espoir.ch


>
>


--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch

Permalink Structure

I have been creating a personal blog engine for the last couple of weeks
because I am tired of using WordPress and I don't have a SQL server
back-end. I have successfully created a working URL rewriting engine
(via Global.asax) that cleans illegal characters from the post title,
uses Regular Expressions to grab the entryID (ie 13), rewrite the path
(entry.aspx?entryID=13).

My current permalink structure is as follows:

root/blog/testing-post-example-00013.aspx

I have noticed that some blog engines have the following schemas for
their permalink structures:

root/blog/testing-post-example/00013.aspx

I have tried to create this structure programmatically with the
following code:

string EntryTitle = "testing-post-example";
string PermaLink = EntryTitle + "/" + "000" + EntryID + ".aspx";

When I try to run this I get the error that the file can't be found,
obviously. There must be a way to create this link structure without
having to physically create the directories. I can't imagine that all
of these bloggers login and create a directory for each post and place a
"showEntry.aspx" file in there.

Any suggestions?

- Will

*** Sent via Developersdex http://www.developersdex.com ***Nevermind!

Original RewritePath
httpContext.RewritePath("entry.aspx?entryID=" + pageID);

New RewritePath
httpContext.RewritePath("/entry.aspx?entryID=" & pageID)

No wonder it was FILE NOT FOUND (enry.aspx). Instead of looking in the
root directory (actual location) for entry.aspx it was looking for
entry.aspx in the dynamically created "directory" folder.

*** Sent via Developersdex http://www.developersdex.com ***

Saturday, March 24, 2012

Permission denied creating directory

Hi,
I have a created a simple file upload asp.net web page which also creates di
rectories on the fly using the following code:
string fullpath = Server.MapPath(".\\..\\..\\" + path);
DirectoryInfo dir = new DirectoryInfo(fullpath);
if(!dir.Exists)
dir.Create();
Now the dir.Create() statement gives me a permission denied. The ASP.NET use
r has been giving full control to the directory and in IIS Admin the directo
ry has write permissions for scripts set. There is no problem in uploading t
he file to an already creat
ed directory which I find extremely weird!
What goes wrong ?
My OS is Windows XP using .NET framework 1.1. All the latest security patche
s are installed.Hi,
Does the "System" account have access?
Cheers,
Phil Winstanley
Microsoft ASP.NET MVP
http://www.myservicescentral.com
Hi Christoffer:
One way to trouble shoot these types of problems is to enable auditing
and find out "who" is getting the access denied message.
See:
http://www.pluralsight.com/keith/bo...leauditing.html
and
http://www.pluralsight.com/keith/bo...fileaccess.html
Also, make sure the permissions apply to subfolders - click "Advanced"
and check the "Apply To" column.
HTH,
Scott
http://www.OdeToCode.com
On Mon, 21 Jun 2004 08:25:40 -0700, Christoffer Srensen
<ChristofferSrensen@.discussions.microsoft.com> wrote:

>Hi,
>I have a created a simple file upload asp.net web page which also creates d
irectories on the fly using the following code:
>string fullpath = Server.MapPath(".\\..\\..\\" + path);
>DirectoryInfo dir = new DirectoryInfo(fullpath);
>if(!dir.Exists)
> dir.Create();
>Now the dir.Create() statement gives me a permission denied. The ASP.NET user has b
een giving full control to the directory and in IIS Admin the directory has write pe
rmissions for scripts set. There is no problem in uploading the file to an already c
rea
ted directory which I find extremely weird!
>What goes wrong ?
>My OS is Windows XP using .NET framework 1.1. All the latest security patches are i
nstalled.
"Scott Allen" wrote:

> One way to trouble shoot these types of problems is to enable auditing
> and find out "who" is getting the access denied message.
> See:
> http://www.pluralsight.com/keith/bo...leauditing.html
> and
> http://www.pluralsight.com/keith/bo...fileaccess.html
Thanks for these links.

> Also, make sure the permissions apply to subfolders - click "Advanced"
> and check the "Apply To" column.
I have found what the problem was. The ASPNET user I added was from another
domain. Now I have added the local ASPNET user and it works.
The audit thing really helped. Thank you very much!
Kind regards,
Christoffer S?rensen

Permission denied creating directory

Hi,

I have a created a simple file upload asp.net web page which also creates directories on the fly using the following code:

string fullpath = Server.MapPath(".\\..\\..\\" + path);
DirectoryInfo dir = new DirectoryInfo(fullpath);
if(!dir.Exists)
dir.Create();

Now the dir.Create() statement gives me a permission denied. The ASP.NET user has been giving full control to the directory and in IIS Admin the directory has write permissions for scripts set. There is no problem in uploading the file to an already created directory which I find extremely weird!

What goes wrong ?

My OS is Windows XP using .NET framework 1.1. All the latest security patches are installed.Hi Christoffer:

One way to trouble shoot these types of problems is to enable auditing
and find out "who" is getting the access denied message.

See:
http://www.pluralsight.com/keith/bo...leauditing.html
and
http://www.pluralsight.com/keith/bo...fileaccess.html

Also, make sure the permissions apply to subfolders - click "Advanced"
and check the "Apply To" column.

HTH,

--
Scott
http://www.OdeToCode.com

On Mon, 21 Jun 2004 08:25:40 -0700, Christoffer Srensen
<ChristofferSrensen@.discussions.microsoft.com> wrote:

>Hi,
>I have a created a simple file upload asp.net web page which also creates directories on the fly using the following code:
>string fullpath = Server.MapPath(".\\..\\..\\" + path);
>DirectoryInfo dir = new DirectoryInfo(fullpath);
>if(!dir.Exists)
> dir.Create();
>Now the dir.Create() statement gives me a permission denied. The ASP.NET user has been giving full control to the directory and in IIS Admin the directory has write permissions for scripts set. There is no problem in uploading the file to an already created directory which I find extremely weird!
>What goes wrong ?
>My OS is Windows XP using .NET framework 1.1. All the latest security patches are installed.
"Scott Allen" wrote:

> One way to trouble shoot these types of problems is to enable auditing
> and find out "who" is getting the access denied message.
> See:
> http://www.pluralsight.com/keith/bo...leauditing.html
> and
> http://www.pluralsight.com/keith/bo...fileaccess.html

Thanks for these links.

> Also, make sure the permissions apply to subfolders - click "Advanced"
> and check the "Apply To" column.

I have found what the problem was. The ASPNET user I added was from another domain. Now I have added the local ASPNET user and it works.

The audit thing really helped. Thank you very much!

Kind regards,

Christoffer S?rensen

Permission Problem

I'm creating the administration module of the my application. I started by using my local machine as the web server. Currently, the application contains functionality that will: move a file to a server on the network, delete a file from the server on the network, and create a file on the server on the network. All of these functions worked beautifully on my local machine.
Now, I have moved my application from my local machine to the live web server for further testing. All of my functionality, at first, did not work. I would receive "Access denied" messages -- hence, a permission problem. (Keep in mind that there are two separate servers on the network that are used for IO operations in this app)
The network admin and I started at the first logical place -- folder permissions on both of the servers. To make a long story short, we set "Full Control" for "Everyone" on the one directory for server 1. This actually resolved the problem creating, moving, and deleting of files through my app. (Although, not the best solution, obviously) However, when setting the permissions for the other server, (and setting them identical to the first), the application still gets "Access denied" errors.
Can someone throw some suggestions my way, as to what permissions need to be set on these directories to work properly? I'm thrown off by the fact that it worked when my local machine acted as the web server, but not on the live web server. I also confirmed that the IIS settings for both my machine and live web server applications were identical. (Although my machine is running IIS 6, and the live server is 5 I believe)
Thanks!

"Although my machine is running IIS 6, and the live server is 5 I believe" - this probably has something to do with it
IIS 5 uses ASPNET to do work - IIS6 uses Network Authority
check outhttp://asp.net/faq/AspNetAndIIS6.aspx
On the servers - you can edit the Local Security Policy to log failed logons - and then you can see the account being used
Hope that Helps

I apologize...my local machine account is using IIS 5 and the web server is 6. I'll check out that article...


The server that is not allowing me to add/move/delete files does not have .NET installed. Stupid question, but is that what's causing the problem here? Do I need to install .NET and then add an ASPNET group to the directory?

Lots of possible issues here. First is how you're authenticating in the app. If you use anonymous access, the user has changed, and may be a network account if the server is a domain controller. Remember that the accounts on your workstation were likely local accounts and you would need to change the account for your app or duplicate that account on the network.

My guess is you're authenticating users since giving the Everyone group full control fixed the access. They may not need Full Control, and Modify might eb enough on the folders. You may even be authenticating without realizing it since IE will pass authentication credentials if the network is seen as being local or in the intranet security zone. Remove Windows Integrated authentication in your web site if you don't intend to authenticate.

Might try Filemon from Sysinternals.com to check access on specific files. This can help quite a bit on the server to server issues.

Jeff

permissions creating web application

The following error seems to plague a lot of people. Who has encountered this and what solutions did you find.

"Unable to create web project <name>. The UNC share <UNC> does not exist or you do not have access.

One suggestion I have seen a few times is create the app on the local machine and then publish to the server. I want to create the app on my develoment server, not on my local machine and then publish to a production box.

I noticed a post from one of this forums "ASP.net team" users stating something along the lines of "creating a web application is a snap just go to New Project --> .net web application". I laughed big time at that. I am in my fourth day of attempting this "snap" process.It works fine, but you have to make sure you have the correct privelages.. From the error it seems you don't have write permissions maybe?
yeah it is a permissions issue. The question is permissions for who? You have my local machine with VS.net installed. I log into a domain so I am assuming that the VS application is running with that account information.

I then try to create an application on a server outside a firewall and not part of the domain. That IIS server is running the show as far as the virtual directory and web application is concerned so I assume the account is IUSR_machine.

That to me seems to be a potential source of this problem.
Check if you have permissions on the directory you are trying to write to. I believe this is just directory permissions you are dealing with here.

Wednesday, March 21, 2012

Permissions on local net

I am creating a local intranet site to use for reporting and other tasks. Some reports should only be accessed by certain people. We are using a Windows 2003 based network. I'd like users to be able to use the site with their same login credentials. (ie if a user logs in to their computer as joe schmoe, I would like them to access the website as joe schmoe without any further login prompts.

Is this possible and/or how do I set this up? I've been playing around with the IIS settings and I cant seem to get it right, it seem to access files and such as the ASPNET user. Is there some setting I should have in the web.config file?

For now, the IIS is version 5.0 because it's ran in a Windows 2000 server...would it be eaiser to move the site to an IIS 6.0 server?If you're using a domain, the recommended way to do this is by using Windows Authentication (in the web.config file you can specify this by means of the <authentication mode="Windows" /> setting). Furthermore, if you want the files on the file system to be access under the context of the logged in user you'll need to enable impersonation (<impersonation enabled="true" />). To get this to work, you webserver should be at least a member server in the domain. However, I'd recommend to move to IIS 6 if you can for better ASP.NET integration and better security/performance.
With this, I get a configuration error:

Parser Error Message: Unrecognized configuration section 'impersonation'
Line 48: <impersonation enabled="true" /
Did you mean:
<identity impersonate="true" />
instead?

I have it set up with <identity impersonate="true" /> and in IIS, Anonymous access is unchecked along with everything else except Integrated Windows authentication.

However, when I attempt to create a file on a network share I get a prompt for a username and password even though the account I'm logged in as has administrator permission and full control over that share. the only way I can continue from this prompt is by enterent the full domain/username and password.

Both the server and client are members of the domain (we're in a single domain environment)

Permissions to create asp.net site

Hi.

I am creating an asp.net application using Windows 2000 Server and
VS.NET 2002. My account is part of the administrators group. I need to
share this machine with another developer. What permissions should I
give to his account in order he can successfuly create asp.net
applications, without being an administrator?

Thanks,
Robert ScheerI never run as an admin on my development box. (You should stop running as
an admin yourself.) The trickiest part to get set up is debugging. Set the
user up as a debugger user. Also, you need to run the aspnet_wp process
using the credentials of the person who is using it to get full debugging -
you can edit this directly in machine.config, and you should also
investigate the aspnet_setreg utility to encrypt these credentials so you
don't have them just sitting in plain text. I have no problems with this
configuration creating and editing asp.net applications.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Robert Scheer" <rbscheer@.my-deja.com> wrote in message
news:cfd22ab6.0312011803.6ffa9ccd@.posting.google.c om...
> Hi.
> I am creating an asp.net application using Windows 2000 Server and
> VS.NET 2002. My account is part of the administrators group. I need to
> share this machine with another developer. What permissions should I
> give to his account in order he can successfuly create asp.net
> applications, without being an administrator?
> Thanks,
> Robert Scheer
Hi Chris.

What problems can I find as an administrator when developing on my .net machine?

Thanks,
Robert Scheer

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message news:<e03UkKPuDHA.1740@.TK2MSFTNGP12.phx.gbl>...
> I never run as an admin on my development box. (You should stop running as
> an admin yourself.) The trickiest part to get set up is debugging. Set the
> user up as a debugger user. Also, you need to run the aspnet_wp process
> using the credentials of the person who is using it to get full debugging -
> you can edit this directly in machine.config, and you should also
> investigate the aspnet_setreg utility to encrypt these credentials so you
> don't have them just sitting in plain text. I have no problems with this
> configuration creating and editing asp.net applications.
> --
> Chris Jackson
> Software Engineer
> Microsoft MVP - Windows Client
> Windows XP Associate Expert
> --
> More people read the newsgroups than read my email.
> Reply to the newsgroup for a faster response.
> (Control-G using Outlook Express)
> --
> "Robert Scheer" <rbscheer@.my-deja.com> wrote in message
> news:cfd22ab6.0312011803.6ffa9ccd@.posting.google.c om...
> > Hi.
> > I am creating an asp.net application using Windows 2000 Server and
> > VS.NET 2002. My account is part of the administrators group. I need to
> > share this machine with another developer. What permissions should I
> > give to his account in order he can successfuly create asp.net
> > applications, without being an administrator?
> > Thanks,
> > Robert Scheer