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

Thursday, March 29, 2012

NEWBIE - Working with Data in ASP.NET 2.0 :: Creating a Data Access Layer (Sample)

Hi all,

I am really new to ASP.net, so thought I would go through one of the samples on here.

I have started the Working with Data in ASP.NET 2.0 :: Creating a Data Access Layer sample, but I get stuck when i add the code to AllProducts.aspx.cs for some reason, I can add the directive 'using NorthwindTableAdapters' when I compile after adding this directive, I get an error ...

Error 143 The type or namespace name 'NorthWindTableAdapters' could not be found (are you missing a using directive or an assembly reference?) C:\data\tutorial\Default.aspx.cs 10 7 C:\data\tutorial\

Any ideas why I am getting this?

Thanks

Pete

Did u added the northwind database to app_data folder?

you need to add that at first.


Hi Crige,

I added the connection to data connections in the Solution explorer, and also added a dataset item to the project as per the tutorial.

How do I add the database to the app_data_folder, when I right click on app_data I get an add new option dialogue, when I look at the database icon in this dialogue, it shows 'empty database' the database I am using is an existing database on the server...

Pete


I am having the same problem. I'm using SQL 2000 instead of the App_Data approach. The document explains how to use this approach but does not explain that the Northwind database is REQUIRED to be in the App_Data folder. Are you sure that this is required? If not, then what else could be the problem?

Thanks,

Larry
You're not going to believe this...

The class name is case-sensitive... NorthwindTableAdapters must be entered as NorthWindTableAdapters (with a capital W). I noticed this by adding an ObjectDataSource to AllProducts.aspx and then selecting a business object in the 'configure data source' screen. The class name is displayed with a capital W.

At least this gets me past this error message... hope it does the same for you.

Thanks,

Larry
Apparently, I named my DataSet NorthWind, with a capital W. My previous post will only resolve the problem if you did the same...

Note that the tutorial did NOT use a capital W, so I introduced this 'bug' myself by naming the xsd file wrong.Embarrassed

At any rate, it's fixed now so it's time to move on.

Monday, March 26, 2012

Newbie ASP.NET/Blog question

Hi

Long-time WinForms, First-time WebForms programmer here...

I am in the process of creating a personal web site, and I want to embed a
blog in this. I have downloaded and played around with dasBlog, which seems
to suit my needs.

However.

I'm wondering what is the common (best) approach to embedding a 'tool' like
dasBlog into your own site?

For example, I want my own site, with 'Home Resume Blog Links' etc toolbar
along the top. When you click Blog, it loads the dasblog into, say, an
IFRAME on my main page? And should dasBlog be a sub-folder of my website?

Or is the best approach to download the dasBlog source and then fiddle
around with it to make it suit what you want it to do? But then what do you
do about upgrades?

Have googled and googled but maybe my search terms are wrong, can't find
anything.

Thanks!Get DotNetNuke and use the blog module if you want it all integrated OR
use WordPress and don't worry about integrating it into the rest of your
site if you want to real blog.

Trust me, I've been down this road before. Nearly every professional
blogger (making more than $1000/month off one blog) in the world will
tell you the same. (ie, I'm reasonably certain they all will, but
someone is likely to prove me wrong.)

--Original Message--
From: DMG [mailto:noemailplease@dotnet.itags.org.nowhere.com]
Posted At: Saturday, November 03, 2007 6:49 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Newbie ASP.NET/Blog question
Subject: Newbie ASP.NET/Blog question

Hi

Long-time WinForms, First-time WebForms programmer here...

I am in the process of creating a personal web site, and I want to embed
a
blog in this. I have downloaded and played around with dasBlog, which
seems
to suit my needs.

However.

I'm wondering what is the common (best) approach to embedding a 'tool'
like
dasBlog into your own site?

For example, I want my own site, with 'Home Resume Blog Links' etc
toolbar
along the top. When you click Blog, it loads the dasblog into, say, an
IFRAME on my main page? And should dasBlog be a sub-folder of my
website?

Or is the best approach to download the dasBlog source and then fiddle
around with it to make it suit what you want it to do? But then what do
you
do about upgrades?

Have googled and googled but maybe my search terms are wrong, can't find

anything.

Thanks!
Ah, see that's exactly what I'd do if it was a means to an end!

But I'm currently re-training as a Web Developer, so I feel like I've got to
learn from it! Had a look at DotNetNuke and these kind of platforms are
great for churning out websites, but unfortunately I *do* want to do it the
hard way in this case.

Thanks for your advice though.

"Dave Bush" <davembush@dotnet.itags.org.dmbcllc.comwrote in message
news:F5438253825445A7BCF5961393218F4A@dotnet.itags.org.OfficeVista. ..

Quote:

Originally Posted by

Get DotNetNuke and use the blog module if you want it all integrated OR
use WordPress and don't worry about integrating it into the rest of your
site if you want to real blog.
>
Trust me, I've been down this road before. Nearly every professional
blogger (making more than $1000/month off one blog) in the world will
tell you the same. (ie, I'm reasonably certain they all will, but
someone is likely to prove me wrong.)
>
--Original Message--
From: DMG [mailto:noemailplease@dotnet.itags.org.nowhere.com]
Posted At: Saturday, November 03, 2007 6:49 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Newbie ASP.NET/Blog question
Subject: Newbie ASP.NET/Blog question
>
Hi
>
Long-time WinForms, First-time WebForms programmer here...
>
I am in the process of creating a personal web site, and I want to embed
a
blog in this. I have downloaded and played around with dasBlog, which
seems
to suit my needs.
>
However.
>
I'm wondering what is the common (best) approach to embedding a 'tool'
like
dasBlog into your own site?
>
For example, I want my own site, with 'Home Resume Blog Links' etc
toolbar
along the top. When you click Blog, it loads the dasblog into, say, an
IFRAME on my main page? And should dasBlog be a sub-folder of my
website?
>
Or is the best approach to download the dasBlog source and then fiddle
around with it to make it suit what you want it to do? But then what do
you
do about upgrades?
>
Have googled and googled but maybe my search terms are wrong, can't find
>
anything.
>
Thanks!
>
>


"Dave Bush" <davembush@dotnet.itags.org.dmbcllc.comwrote in message
news:F5438253825445A7BCF5961393218F4A@dotnet.itags.org.OfficeVista. ..

Quote:

Originally Posted by

Get DotNetNuke


Or, alternatively, go nowhere near DotNetNuke unless it has improved beyond
all recognition since I last looked at it...

--
Mark Rae
ASP.NET MVP
http://www.markrae.net
As a professional dev, I need to use this site as a showcase of my, ahem,
'talents' (restricted in the web as they are at the moment), so using a
third-party generator is out of the question for me.

Like I said, I need to do it the hard way, which will ultimately be quite
rewarding (I hope).

"Mark Rae [MVP]" <mark@dotnet.itags.org.markNOSPAMrae.netwrote in message
news:e3DkpQhHIHA.3768@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

"Dave Bush" <davembush@dotnet.itags.org.dmbcllc.comwrote in message
news:F5438253825445A7BCF5961393218F4A@dotnet.itags.org.OfficeVista. ..
>

Quote:

Originally Posted by

>Get DotNetNuke


>
Or, alternatively, go nowhere near DotNetNuke unless it has improved
beyond all recognition since I last looked at it...
>
>
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


I use thinkjot on my site, which is dasblog cut down. Its not bad, easy
enough to getup up and running, no DB needed and of course is free. I've
also made a concscious decision not to integrate it into my site so my blog
is just a branch off it.

http://www.process64.com/thinkjot/
Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"DMG" <noemailplease@dotnet.itags.org.nowhere.comwrote in message
news:eXZZ5bhHIHA.5232@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

As a professional dev, I need to use this site as a showcase of my, ahem,
'talents' (restricted in the web as they are at the moment), so using a
third-party generator is out of the question for me.
>
Like I said, I need to do it the hard way, which will ultimately be quite
rewarding (I hope).
>
>
"Mark Rae [MVP]" <mark@dotnet.itags.org.markNOSPAMrae.netwrote in message
news:e3DkpQhHIHA.3768@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

>"Dave Bush" <davembush@dotnet.itags.org.dmbcllc.comwrote in message
>news:F5438253825445A7BCF5961393218F4A@dotnet.itags.org.OfficeVista. ..
>>

Quote:

Originally Posted by

>>Get DotNetNuke


>>
>Or, alternatively, go nowhere near DotNetNuke unless it has improved
>beyond all recognition since I last looked at it...
>>
>>
>--
>Mark Rae
>ASP.NET MVP
>http://www.markrae.net


>
>


Then do answer your original question.

Don't use an IFrame.

If I were going to "do it the hard way." I'd keep them separate and
skin them both to LOOK the same. (Which is also a possibility using
WordPress alongside ASPX code)

Ultimately, you'll have to decide on your own. But, now that I have 20
years of experience and have done a bit of hiring myself. Let me give
you my perspective on "the hard way."

If I were interviewing you, I'd be more interested in how you solved
problems than in what you specifically knew. You'd get points for
choosing the hard way so you could learn. You'd get even more points if
you told me you picked a solution because it got the job done in the
shortest amount of time and the least expense. What you have to know in
this industry changes too fast to be able to hire someone based on what
they know. Problem solving skills never go out of style.

Just my two cents.

--Original Message--
From: DMG [mailto:noemailplease@dotnet.itags.org.nowhere.com]
Posted At: Saturday, November 03, 2007 8:13 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Newbie ASP.NET/Blog question
Subject: Re: Newbie ASP.NET/Blog question

Ah, see that's exactly what I'd do if it was a means to an end!

But I'm currently re-training as a Web Developer, so I feel like I've
got to
learn from it! Had a look at DotNetNuke and these kind of platforms are

great for churning out websites, but unfortunately I *do* want to do it
the
hard way in this case.

Thanks for your advice though.

"Dave Bush" <davembush@dotnet.itags.org.dmbcllc.comwrote in message
news:F5438253825445A7BCF5961393218F4A@dotnet.itags.org.OfficeVista. ..

Quote:

Originally Posted by

Get DotNetNuke and use the blog module if you want it all integrated


OR

Quote:

Originally Posted by

use WordPress and don't worry about integrating it into the rest of


your

Quote:

Originally Posted by

site if you want to real blog.
>
Trust me, I've been down this road before. Nearly every professional
blogger (making more than $1000/month off one blog) in the world will
tell you the same. (ie, I'm reasonably certain they all will, but
someone is likely to prove me wrong.)
>
--Original Message--
From: DMG [mailto:noemailplease@dotnet.itags.org.nowhere.com]
Posted At: Saturday, November 03, 2007 6:49 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Newbie ASP.NET/Blog question
Subject: Newbie ASP.NET/Blog question
>
Hi
>
Long-time WinForms, First-time WebForms programmer here...
>
I am in the process of creating a personal web site, and I want to


embed

Quote:

Originally Posted by

a
blog in this. I have downloaded and played around with dasBlog, which
seems
to suit my needs.
>
However.
>
I'm wondering what is the common (best) approach to embedding a 'tool'
like
dasBlog into your own site?
>
For example, I want my own site, with 'Home Resume Blog Links' etc
toolbar
along the top. When you click Blog, it loads the dasblog into, say,


an

Quote:

Originally Posted by

IFRAME on my main page? And should dasBlog be a sub-folder of my
website?
>
Or is the best approach to download the dasBlog source and then fiddle
around with it to make it suit what you want it to do? But then what


do

Quote:

Originally Posted by

you
do about upgrades?
>
Have googled and googled but maybe my search terms are wrong, can't


find

Quote:

Originally Posted by

>
anything.
>
Thanks!
>
>


I had a quick look at your site, and by keeping the theme similar it does at
first glance look like that blog is integrated with your site, although I
can see that it is separate.

What I'm curious about is whether this is the 'de facto' standard approach?
i.e. why did you choose not to integrate it with your site? Is it because
it is indeed (as I suspect) a lot of work?

I am thinking of the following set up:

My Home Site
My Blog Site

a link to My Home site from My Blog site.

Is this a perfectly acceptable setup?

"John Timney (MVP)" <xyz_john@dotnet.itags.org.timney.eclipse.co.ukwrote in message
news:P9OdnUBsv6wl8rHanZ2dneKdnZydnZ2d@dotnet.itags.org.eclipse.net. uk...

Quote:

Originally Posted by

>I use thinkjot on my site, which is dasblog cut down. Its not bad, easy
>enough to getup up and running, no DB needed and of course is free. I've
>also made a concscious decision not to integrate it into my site so my blog
>is just a branch off it.
>
http://www.process64.com/thinkjot/
>
Regards
>
John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
>
>
"DMG" <noemailplease@dotnet.itags.org.nowhere.comwrote in message
news:eXZZ5bhHIHA.5232@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

>As a professional dev, I need to use this site as a showcase of my, ahem,
>'talents' (restricted in the web as they are at the moment), so using a
>third-party generator is out of the question for me.
>>
>Like I said, I need to do it the hard way, which will ultimately be quite
>rewarding (I hope).
>>
>>
>"Mark Rae [MVP]" <mark@dotnet.itags.org.markNOSPAMrae.netwrote in message
>news:e3DkpQhHIHA.3768@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

>>"Dave Bush" <davembush@dotnet.itags.org.dmbcllc.comwrote in message
>>news:F5438253825445A7BCF5961393218F4A@dotnet.itags.org.OfficeVista. ..
>>>
>>>Get DotNetNuke
>>>
>>Or, alternatively, go nowhere near DotNetNuke unless it has improved
>>beyond all recognition since I last looked at it...
>>>
>>>
>>--
>>Mark Rae
>>ASP.NET MVP
>>http://www.markrae.net


>>
>>


>
>


Yeah, good advice.

I think there are so many different tools for different solutions, and the
important thing is being aware of what is the right tool for the job.

At the moment, I am definitely looking at this as an exercise, as I am
really curious what makes the web 'tick'. Coming over from 8 years windows
development, I have so many questions!

In all likelihood, as I don't have that much time to spend on this, I'd be
satisifed finding out how it pieced together, and then probably abandon it
in favour of something that would get the job done. I'll definitely take a
look at DotNetNuke. I'll also look at creating a Home site through the
Personal Starter Kit (just to get started) and a separate blog site using
dasBlog or something similar.

Thanks.

Quote:

Originally Posted by

Or, alternatively, go nowhere near DotNetNuke unless it has improved
beyond
all recognition since I last looked at it...


The last time I looked at it it was pretty bad, that said, while I have no
DIRECT experience, it seems to have come a long way.

And, besides, it can't be WORSE that SharePoint, right? ;o)

-Darrel
But I'm currently re-training as a Web Developer, so I feel like I've got

Quote:

Originally Posted by

to learn from it! Had a look at DotNetNuke and these kind of platforms
are great for churning out websites, but unfortunately I *do* want to do
it the hard way in this case.


What 'integration' are you looking for?

Ultimately a good web developer knows that WordPress is the defacto
standard. ;0)

Unless you are a client have a STRONG compelling reason to not use
WordPress, use it.

As for ASP.net options, there haven't been a lot of .net blog engines in the
past.

However, there's a new(ish) open source project at codeplex that would
probably suit your needs well:

http://www.codeplex.com/blogengine
-Darrel
What I'm curious about is whether this is the 'de facto' standard

Quote:

Originally Posted by

approach? i.e. why did you choose not to integrate it with your site? Is
it because it is indeed (as I suspect) a lot of work?


Again, I think you're held up on this term 'integrate'. What, exactly, do
you need to integrate? Navigation can just be duplicated on both sites. As
can the HTML + CSS. You could send RSS feeds to pages on your site to show
some content on the main pages. Beyond that, though, I'm not sure what
integration one really needs.

-Darrel
Don't think I can use WordPress as my site is going to be ASP.NET and I'm
under the impression WordPress is PHP only??

See my other reply about my definition of 'integration'.

Cheers though!

"Darrel" <notreal@dotnet.itags.org.nospam.comwrote in message
news:eK3ZSMiHIHA.6068@dotnet.itags.org.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

Quote:

Originally Posted by

>But I'm currently re-training as a Web Developer, so I feel like I've got
>to learn from it! Had a look at DotNetNuke and these kind of platforms
>are great for churning out websites, but unfortunately I *do* want to do
>it the hard way in this case.


>
>
What 'integration' are you looking for?
>
Ultimately a good web developer knows that WordPress is the defacto
standard. ;0)
>
Unless you are a client have a STRONG compelling reason to not use
WordPress, use it.
>
As for ASP.net options, there haven't been a lot of .net blog engines in
the past.
>
However, there's a new(ish) open source project at codeplex that would
probably suit your needs well:
>
http://www.codeplex.com/blogengine
>
-Darrel
>


WordPress is PHP. But you can run PHP under IIS without any trouble.

--Original Message--
From: DMG [mailto:noemailplease@dotnet.itags.org.nowhere.com]
Posted At: Saturday, November 03, 2007 10:27 AM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Newbie ASP.NET/Blog question
Subject: Re: Newbie ASP.NET/Blog question

Don't think I can use WordPress as my site is going to be ASP.NET and
I'm
under the impression WordPress is PHP only??

See my other reply about my definition of 'integration'.

Cheers though!

"Darrel" <notreal@dotnet.itags.org.nospam.comwrote in message
news:eK3ZSMiHIHA.6068@dotnet.itags.org.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

Quote:

Originally Posted by

>But I'm currently re-training as a Web Developer, so I feel like I've


got

Quote:

Originally Posted by

Quote:

Originally Posted by

>to learn from it! Had a look at DotNetNuke and these kind of


platforms

Quote:

Originally Posted by

Quote:

Originally Posted by

>are great for churning out websites, but unfortunately I *do* want to


do

Quote:

Originally Posted by

Quote:

Originally Posted by

>it the hard way in this case.


>
>
What 'integration' are you looking for?
>
Ultimately a good web developer knows that WordPress is the defacto
standard. ;0)
>
Unless you are a client have a STRONG compelling reason to not use
WordPress, use it.
>
As for ASP.net options, there haven't been a lot of .net blog engines


in

Quote:

Originally Posted by

the past.
>
However, there's a new(ish) open source project at codeplex that would


Quote:

Originally Posted by

probably suit your needs well:
>
http://www.codeplex.com/blogengine
>
-Darrel
>


Don't think I can use WordPress as my site is going to be ASP.NET and I'm

Quote:

Originally Posted by

under the impression WordPress is PHP only??


Most Windows hosts support both.

Quote:

Originally Posted by

See my other reply about my definition of 'integration'.


It appears you just want a navigation bar that goes from pages on your site
to your blog and have them look the same? You could have your blog on
another server and accomplish that just fine, so I wouldn't get too hung up
on the term 'integration'.

-Darrel
Okay, integration.

Well, here's what I'm after.

I have a custom site, written in ASP.NET, which has all the usual rubbish on
it. I have a link to my blog, now I don't want to go and write my own
custom blog, so I'd be looking at 'linking' a third party one in.

What I'm curious about is whether people actually integrate these with their
web site or just (as John Timney describes) links to an external blog site.

For example, if i install dasblog, and I have it 'under' my own website,
then IIS will look like this:

MyWebsite [Virtual Directory]
DasBlog [Virtual Directory]

I have a link to my dasblog from my website, and it opens up 'inside' (by
way of perhaps an IFRAME, even although that has been derided by a previous
poster to this thread).

So the url for the blog would be, 'www.mywebsite/blog'.

Does that make any sense? :)

Also, to confuse things even further, I was thinking about making use of
ASP.NET Master Pages. Is it achievable to do this and link the blog in
using these, or not?

However, as I've said before if it is perfectly acceptable to have a link to
an external blog site then that's the way I'll do it.

"Darrel" <notreal@dotnet.itags.org.nospam.comwrote in message
news:OAqm4NiHIHA.3400@dotnet.itags.org.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

Quote:

Originally Posted by

>What I'm curious about is whether this is the 'de facto' standard
>approach? i.e. why did you choose not to integrate it with your site? Is
>it because it is indeed (as I suspect) a lot of work?


>
Again, I think you're held up on this term 'integrate'. What, exactly, do
you need to integrate? Navigation can just be duplicated on both sites. As
can the HTML + CSS. You could send RSS feeds to pages on your site to show
some content on the main pages. Beyond that, though, I'm not sure what
integration one really needs.
>
-Darrel
>


You might want to take a look at BlogEngine.Net :

http://www.codeplex.com/blogengine/...?ReleaseId=5922
It's simple to setup and easy to use.
Full source included, so you can modify to taste.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
======================================
"DMG" <noemailplease@dotnet.itags.org.nowhere.comwrote in message news:eVvtVdgHIHA.2064@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

Hi
>
Long-time WinForms, First-time WebForms programmer here...
>
I am in the process of creating a personal web site, and I want to embed a blog in this. I have downloaded and played
around with dasBlog, which seems to suit my needs.
>
However.
>
I'm wondering what is the common (best) approach to embedding a 'tool' like dasBlog into your own site?
>
For example, I want my own site, with 'Home Resume Blog Links' etc toolbar along the top. When you click Blog, it
loads the dasblog into, say, an IFRAME on my main page? And should dasBlog be a sub-folder of my website?
>
Or is the best approach to download the dasBlog source and then fiddle around with it to make it suit what you want it
to do? But then what do you do about upgrades?
>
Have googled and googled but maybe my search terms are wrong, can't find anything.
>
Thanks!
>


That's great, but is that how it's done? Do I create my web site around it?
And what happens if it is updated, I then need to manually merge the changes
with my source?

"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.comwrote in message
news:OulCa$iHIHA.5360@dotnet.itags.org.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

You might want to take a look at BlogEngine.Net :
>
http://www.codeplex.com/blogengine/...?ReleaseId=5922
>
It's simple to setup and easy to use.
Full source included, so you can modify to taste.
>
>
>
>
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
======================================
"DMG" <noemailplease@dotnet.itags.org.nowhere.comwrote in message
news:eVvtVdgHIHA.2064@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

>Hi
>>
>Long-time WinForms, First-time WebForms programmer here...
>>
>I am in the process of creating a personal web site, and I want to embed
>a blog in this. I have downloaded and played around with dasBlog, which
>seems to suit my needs.
>>
>However.
>>
>I'm wondering what is the common (best) approach to embedding a 'tool'
>like dasBlog into your own site?
>>
>For example, I want my own site, with 'Home Resume Blog Links' etc
>toolbar along the top. When you click Blog, it loads the dasblog into,
>say, an IFRAME on my main page? And should dasBlog be a sub-folder of my
>website?
>>
>Or is the best approach to download the dasBlog source and then fiddle
>around with it to make it suit what you want it to do? But then what do
>you do about upgrades?
>>
>Have googled and googled but maybe my search terms are wrong, can't find
>anything.
>>
>Thanks!
>>


>
>


For example, if i install dasblog, and I have it 'under' my own website,

Quote:

Originally Posted by

then IIS will look like this:
>
MyWebsite [Virtual Directory]
DasBlog [Virtual Directory]
>
I have a link to my dasblog from my website, and it opens up 'inside' (by
way of perhaps an IFRAME, even although that has been derided by a
previous poster to this thread).


Yes, iframes are bad.

But I'm still not sure what 'integrate' means to you.

Quote:

Originally Posted by

So the url for the blog would be, 'www.mywebsite/blog'.


Ah, I see, well, if it's merely a URL issue (which I don't think is a huge
deal) then your method would be fine. You could even run WordPress along
side your asp.net site if you really wanted to under the same domain.

Quote:

Originally Posted by

Also, to confuse things even further, I was thinking about making use of
ASP.NET Master Pages. Is it achievable to do this and link the blog in
using these, or not?


Well, if you want to use ASP.net master pages, then you do need an ASP.net
blog system that supports master pages.

I'm not thrilled with master pages myself, but yea, that's a pure ASP.net
concept.

-Darrel
Okay, things are starting to become a bit clearer now.

Did a bit more googling based on what I've learned from this thread, and it
seems that providing a feed into your main site from your blog site, and a
link to an external blog site is somewhat standard practice.

By integration, I mean what is described in this article:

http://jonathanwold.com/tutorials/w...ss_integration/
I didn't think ASP.NET and PHP were compatible, but it seems that they are,
so I'll google for some more info on that. If anyone knows of any good
links then that would be appreciated.

Ta!

"Darrel" <notreal@dotnet.itags.org.nospam.comwrote in message
news:uMqde%23jHIHA.4684@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

Quote:

Originally Posted by

>For example, if i install dasblog, and I have it 'under' my own website,
>then IIS will look like this:
>>
>MyWebsite [Virtual Directory]
> DasBlog [Virtual Directory]
>>
>I have a link to my dasblog from my website, and it opens up 'inside' (by
>way of perhaps an IFRAME, even although that has been derided by a
>previous poster to this thread).


>
Yes, iframes are bad.
>
But I'm still not sure what 'integrate' means to you.
>

Quote:

Originally Posted by

>So the url for the blog would be, 'www.mywebsite/blog'.


>
Ah, I see, well, if it's merely a URL issue (which I don't think is a huge
deal) then your method would be fine. You could even run WordPress along
side your asp.net site if you really wanted to under the same domain.
>

Quote:

Originally Posted by

>Also, to confuse things even further, I was thinking about making use of
>ASP.NET Master Pages. Is it achievable to do this and link the blog in
>using these, or not?


>
Well, if you want to use ASP.net master pages, then you do need an ASP.net
blog system that supports master pages.
>
I'm not thrilled with master pages myself, but yea, that's a pure ASP.net
concept.
>
-Darrel
>


That's great, but is that how it's done? Do I create my web site around

Quote:

Originally Posted by

it? And what happens if it is updated, I then need to manually merge the
changes with my source?


Like you mention before, just run it as a separate application folder. No
need to intertwine its code with yours.

-Darrel
I didn't think ASP.NET and PHP were compatible, but it seems that they

Quote:

Originally Posted by

are, so I'll google for some more info on that. If anyone knows of any
good links then that would be appreciated.


They're not compatible in that they can talk to each other seemlessly. They
can both be interpreted by an IIS server, though.

I think 'integration' you are looking for could easily be done via shared
CSS and a handful of server side includes.

-Darrel
re:
!That's great, but is that how it's done? Do I create my web site around it?

I'd simply create a virtual directory to the blog and include a link to it from
your main app ( I'd also include a link back to your main app in the blog ).

You don't have to integrate the code, just provide navigation back and forth.

I would try to have the general "look and feel" of the blog
and your main app as similar as possible, though.

A standard CSS theme will take care of that.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
======================================
"DMG" <noemailplease@dotnet.itags.org.nowhere.comwrote in message news:uslwkljHIHA.4476@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

That's great, but is that how it's done? Do I create my web site around it? And what happens if it is updated, I then
need to manually merge the changes with my source?


Quote:

Originally Posted by

"Juan T. Llibre" <nomailreplies@dotnet.itags.org.nowhere.comwrote in message news:OulCa$iHIHA.5360@dotnet.itags.org.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

>You might want to take a look at BlogEngine.Net :
>>
>http://www.codeplex.com/blogengine/...?ReleaseId=5922
>>
>It's simple to setup and easy to use.
>Full source included, so you can modify to taste.
>>
>>
>>
>>
>Juan T. Llibre, asp.net MVP
>asp.net faq : http://asp.net.do/faq/
>foros de asp.net, en espaol : http://asp.net.do/foros/
>======================================
>"DMG" <noemailplease@dotnet.itags.org.nowhere.comwrote in message news:eVvtVdgHIHA.2064@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

>>Hi
>>>
>>Long-time WinForms, First-time WebForms programmer here...
>>>
>>I am in the process of creating a personal web site, and I want to embed a blog in this. I have downloaded and
>>played around with dasBlog, which seems to suit my needs.
>>>
>>However.
>>>
>>I'm wondering what is the common (best) approach to embedding a 'tool' like dasBlog into your own site?
>>>
>>For example, I want my own site, with 'Home Resume Blog Links' etc toolbar along the top. When you click Blog, it
>>loads the dasblog into, say, an IFRAME on my main page? And should dasBlog be a sub-folder of my website?
>>>
>>Or is the best approach to download the dasBlog source and then fiddle around with it to make it suit what you want
>>it to do? But then what do you do about upgrades?
>>>
>>Have googled and googled but maybe my search terms are wrong, can't find anything.
>>>
>>Thanks!
>>>


>>
>>


>
>


I don't think there is a standard approach - its whatever works for you. In
my case, it was a lot less work to do it that way than to try and embed it.
To be truthful, the blog software was an afterthought and I decided to make
it part of my site without going to the expense of completely rebranding it.
Although it wouldn''t have been a mammoth task to totally amalgamate the
brand into the blog software, I decided to make a clear distinction between
my web site and my blog site, so although the brand is similar they portray
a different purpose.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"DMG" <noemailplease@dotnet.itags.org.nowhere.comwrote in message
news:O2ZZNphHIHA.868@dotnet.itags.org.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

>I had a quick look at your site, and by keeping the theme similar it does
>at first glance look like that blog is integrated with your site, although
>I can see that it is separate.
>
What I'm curious about is whether this is the 'de facto' standard
approach? i.e. why did you choose not to integrate it with your site? Is
it because it is indeed (as I suspect) a lot of work?
>
I am thinking of the following set up:
>
My Home Site
My Blog Site
>
a link to My Home site from My Blog site.
>
Is this a perfectly acceptable setup?
>
>
"John Timney (MVP)" <xyz_john@dotnet.itags.org.timney.eclipse.co.ukwrote in message
news:P9OdnUBsv6wl8rHanZ2dneKdnZydnZ2d@dotnet.itags.org.eclipse.net. uk...

Quote:

Originally Posted by

>>I use thinkjot on my site, which is dasblog cut down. Its not bad, easy
>>enough to getup up and running, no DB needed and of course is free. I've
>>also made a concscious decision not to integrate it into my site so my
>>blog is just a branch off it.
>>
>http://www.process64.com/thinkjot/
>>
>Regards
>>
>John Timney (MVP)
>http://www.johntimney.com
>http://www.johntimney.com/blog
>>
>>
>"DMG" <noemailplease@dotnet.itags.org.nowhere.comwrote in message
>news:eXZZ5bhHIHA.5232@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

>>As a professional dev, I need to use this site as a showcase of my,
>>ahem, 'talents' (restricted in the web as they are at the moment), so
>>using a third-party generator is out of the question for me.
>>>
>>Like I said, I need to do it the hard way, which will ultimately be
>>quite rewarding (I hope).
>>>
>>>
>>"Mark Rae [MVP]" <mark@dotnet.itags.org.markNOSPAMrae.netwrote in message
>>news:e3DkpQhHIHA.3768@dotnet.itags.org.TK2MSFTNGP06.phx.gbl...
>>>"Dave Bush" <davembush@dotnet.itags.org.dmbcllc.comwrote in message
>>>news:F5438253825445A7BCF5961393218F4A@dotnet.itags.org.OfficeVista. ..
>>
>>Get DotNetNuke
>>
>>>Or, alternatively, go nowhere near DotNetNuke unless it has improved
>>>beyond all recognition since I last looked at it...
>>
>>
>>>--
>>>Mark Rae
>>>ASP.NET MVP
>>>http://www.markrae.net
>>>
>>>


>>
>>


>
>

Saturday, March 24, 2012

Newbie Help?

Hello:

I have installed the web matrix and worked through the tutorials. I am currently trying to do the tutorials on creating an application.

I am using c# and created the following default.aspx according to the instructions. When I try to run the default page in the webserver, I get a "specified cast is not valid." error. I searched through the archives and found information on changing the webmatrix.exe.config and the webserver.exe.config to att a startup tag to force the matrix to access the proper version of the .net framework.

I made these changes and still receive the error. Can anyone help me? The code is below with the error point marked.


private void BindMasterGrid() {

// TODO: Update the ConnectionString and CommandText values for your application
string ConnectionString = "server=(local);database=Orders;Integrated Security=SSPI";
string CommandText = "select OrderID, OrderDate, CustomerName from Orders";

SqlConnection myConnection = new SqlConnection(ConnectionString);
SqlDataAdapter myCommand = new SqlDataAdapter(CommandText, myConnection);

DataSet ds = new DataSet();
myCommand.Fill(ds);

MasterGrid.DataSource = ds;
MasterGrid.DataBind();
}

private void BindDetailGrid() {
// get the filter value from the master Grid's DataKeys collection
if (MasterGrid.SelectedIndex != -1) {
// TODO: update the ConnectionString value for your application
string ConnectionString = "server=(local);database=Orders;Integrated Security=SSPI";

// TODO: update the CommandText value for your application

** this is where the error takes place. This line was autogenerated by the matrix and I have changed nothing. The error is: specified cast is not valid.

string filterValue = ((string) MasterGrid.DataKeys[MasterGrid.SelectedIndex]).Replace("'", "''");

string CommandText = "select OrderDetailID, ProductName, Quantity, UnitPrice from OrderDetails where OrderID = '" + filterValue + "'";

SqlConnection myConnection = new SqlConnection(ConnectionString);
SqlCommand myCommand = new SqlCommand(CommandText, myConnection);

myConnection.Open();

DetailsGrid.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
}

DetailsGrid.DataBind();
}

I don't know for sure what's going on, but you should be able to fix it by doing this:
string filterValue = (MasterGrid.DataKeys[MasterGrid.SelectedIndex].ToString());
filterValue = filterValue.Replace("'", "''");
IOW, use ToString() to perform the casting then break the Replace method off into another line. Works for me, anyway. I'll ask, see if anyone knows why this is.
Thank you for your help. My gut reaction was to try .ToString(), but I didn't know if that was the same thing as the cast (string). You're right. It worked fine this way. Thanks so much for answering.
Got the answer, I think. One of my colleagues said this:

"The DataKeys collection doesn't necessarily contain objects of type String. It depends on the data type of the key field specified by the DatatKeyField property. If the key field is an integer value, then the DataKeys collection contains Int32 objects. That's why the ToString() method always works, but casting doesn't. ToString() always returns the string representation of the key value.

Sounds like that's a bug in Web Matrix. It's assuming that the key field is a string, which may not always be the case."

I suppose it is a bug, then; it doesn't get uncovered, however, unless (as here) we change the database that the template points to. Presumably it works with Pubs. (?)

Thursday, March 22, 2012

Newbie in .NET - Cookie Tutorial?

Hello

I'm creating a site with ASP .NET 2.0 and VB .NET. I want to use cookies to remember want the user entered in previously. I've never used cookies before so I was wondering if there is a good online tutorial about?

Thanks

Kev.

"A stitch in time would have confused Einstein. " - Unknown.http://www.codetoad.com/asp.net/cookies.asp

Just remember never to use Response.Write like they have in that tutorial.
What should be used instead of response.write?
Controls.
At the moment I'm using -

Dim Cookie As HttpCookie = New HttpCookie("BuyerSellerLogin")

Cookie.Values.Add("regnumber", Request.Form.Item("regnumber"))
'Cookie.Values.Add("username", username.Value)
Cookie.Expires = #1/1/2007#
Response.Cookies.Add(Cookie)

And to retrieve I'm using

Dim c As HttpCookie = Request.Cookies("BuyerSellerLogin")

If Not (IsNothing(c)) Then
regnumber.Value = Request.Cookies("BuyerSellerLogin")("regnumber")
End If

how would you store a list of values into a cookie and bring them back. For example one of the fields I'm using is Vessel Name. I want to give the user a list of all previously entered vessel names?

KEv.

Newbie issue: Error creating Web Service in VS 2003

This summary is not available. Please click here to view the post.

Newbie issue: Error creating Web Service in VS 2003

Hi all! Here's my problem:

When trying to create a new C# Web Service in VS 2003, I get the following error
message:
"The Web server reported the following error when attempting to create or open
the Web project located at the following URL: 'http://localhost/WebService1'.
'HTTP/1.1 500 Internal Server Error'.

The Event Viewer contains 2 copies of this entry:
"Failed to execute request because the App-Domain could not be created. Error:
0x80131534" (Source: ASP.NET 1.1.4322.0, Event ID: 1088).

IIS Log file contains the following:
#Software: Microsoft Internet Information Services 5.1
#Version: 1.0
#Date: 2004-07-20 13:44:50
#Fields: time c-ip cs-method cs-uri-stem sc-status
13:44:50 127.0.0.1 GET /WebService1/get_aspx_ver.aspx 500
13:44:50 127.0.0.1 GET /get_aspx_ver.aspx 500

I have:
Uninstalled VS 2003, the .NET v1.1 Framework, and IIS.
Re-installed IIS, the .NET v1.1 Framework, and VS 2003.
Given the ASPNET user "Admin" rights and I/O rights to the C:\Inetpub folder.
Modified the <processModel> section of the Machine.Config file so that the the
SYSTEM account is being used.
Run aspnet_regiis.exe.
Probably done some other things I can no longer remember.

The machine is my normal local development box - running XP Pro.
I can hit http://localhost and all is well.
This is the first time I've tried to create a Web Service on this machine, so I
can't tell you if something has changed or if it ever worked.

I'm assuming it's a rights issue of some sort (although that get_aspx_ver.aspx
returning a '500' has me a bit confused - but like I mentioned, I'm a newbie).

Any suggestions would be much appreciated.

Thanks!

-- JimDid u google it ??
u'll find some posts on it ... are u developing on a domain controller
itself ?

--
Regards,
Mike
http://bikesh.europe.webmatrixhosting.net
http://www.planetsourcecode.com (search keyword: phoetus)

"JPH" <JPH_member@.newsguy.com> wrote in message
news:cdj8ad02cop@.drn.newsguy.com...
> Hi all! Here's my problem:
> When trying to create a new C# Web Service in VS 2003, I get the following
error
> message:
> "The Web server reported the following error when attempting to create or
open
> the Web project located at the following URL:
'http://localhost/WebService1'.
> 'HTTP/1.1 500 Internal Server Error'.
>
> The Event Viewer contains 2 copies of this entry:
> "Failed to execute request because the App-Domain could not be created.
Error:
> 0x80131534" (Source: ASP.NET 1.1.4322.0, Event ID: 1088).
>
> IIS Log file contains the following:
> #Software: Microsoft Internet Information Services 5.1
> #Version: 1.0
> #Date: 2004-07-20 13:44:50
> #Fields: time c-ip cs-method cs-uri-stem sc-status
> 13:44:50 127.0.0.1 GET /WebService1/get_aspx_ver.aspx 500
> 13:44:50 127.0.0.1 GET /get_aspx_ver.aspx 500
> I have:
> Uninstalled VS 2003, the .NET v1.1 Framework, and IIS.
> Re-installed IIS, the .NET v1.1 Framework, and VS 2003.
> Given the ASPNET user "Admin" rights and I/O rights to the C:\Inetpub
folder.
> Modified the <processModel> section of the Machine.Config file so that the
the
> SYSTEM account is being used.
> Run aspnet_regiis.exe.
> Probably done some other things I can no longer remember.
>
> The machine is my normal local development box - running XP Pro.
> I can hit http://localhost and all is well.
> This is the first time I've tried to create a Web Service on this machine,
so I
> can't tell you if something has changed or if it ever worked.
> I'm assuming it's a rights issue of some sort (although that
get_aspx_ver.aspx
> returning a '500' has me a bit confused - but like I mentioned, I'm a
newbie).
> Any suggestions would be much appreciated.
> Thanks!
> -- Jim

--
Outgoing mail is certified Virus Free. (well i'd like to think it is.. )
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.723 / Virus Database: 479 - Release Date: 20/07/2004
Oh yeah, I definitely googled it. Tried everything I found - no luck
whatsoever.

And nope - not on a domain controller, though I did try q315158 just in case -
no luck there either.

In article <ulGYmOnbEHA.1644@.tk2msftngp13.phx.gbl>, Mike Smith says...
>Did u google it ??
>u'll find some posts on it ... are u developing on a domain controller
>itself ?
>--
>Regards,
>Mike
>http://bikesh.europe.webmatrixhosting.net
>http://www.planetsourcecode.com (search keyword: phoetus)
>"JPH" <JPH_member@.newsguy.com> wrote in message
>news:cdj8ad02cop@.drn.newsguy.com...
>> Hi all! Here's my problem:
>>
>> When trying to create a new C# Web Service in VS 2003, I get the following
>error
>> message:
>> "The Web server reported the following error when attempting to create or
>open
>> the Web project located at the following URL:
>'http://localhost/WebService1'.
>> 'HTTP/1.1 500 Internal Server Error'.
>>
>>
>> The Event Viewer contains 2 copies of this entry:
>> "Failed to execute request because the App-Domain could not be created.
>Error:
>> 0x80131534" (Source: ASP.NET 1.1.4322.0, Event ID: 1088).
>>
>>
>> IIS Log file contains the following:
>> #Software: Microsoft Internet Information Services 5.1
>> #Version: 1.0
>> #Date: 2004-07-20 13:44:50
>> #Fields: time c-ip cs-method cs-uri-stem sc-status
>> 13:44:50 127.0.0.1 GET /WebService1/get_aspx_ver.aspx 500
>> 13:44:50 127.0.0.1 GET /get_aspx_ver.aspx 500
>>
>> I have:
>> Uninstalled VS 2003, the .NET v1.1 Framework, and IIS.
>> Re-installed IIS, the .NET v1.1 Framework, and VS 2003.
>> Given the ASPNET user "Admin" rights and I/O rights to the C:\Inetpub
>folder.
>> Modified the <processModel> section of the Machine.Config file so that the
>the
>> SYSTEM account is being used.
>> Run aspnet_regiis.exe.
>> Probably done some other things I can no longer remember.
>>
>>
>> The machine is my normal local development box - running XP Pro.
>> I can hit http://localhost and all is well.
>> This is the first time I've tried to create a Web Service on this machine,
>so I
>> can't tell you if something has changed or if it ever worked.
>>
>> I'm assuming it's a rights issue of some sort (although that
>get_aspx_ver.aspx
>> returning a '500' has me a bit confused - but like I mentioned, I'm a
>newbie).
>>
>> Any suggestions would be much appreciated.
>>
>> Thanks!
>>
>> -- Jim
>>
>
>--
>Outgoing mail is certified Virus Free. (well i'd like to think it is.. )
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.723 / Virus Database: 479 - Release Date: 20/07/2004

Friday, March 16, 2012

Newbie Needs Help!

Hi,
I'd appreciate some advise... I've been assigned the task of creating form
based authentication via SQL Server for a section of our corporate web site.
I know classic ASP quite well, but the ASP .NET world is very different.
And from what I've read, ASP .NET has some great functionality built into it
for form based authentication. What I'd like to know is how to make this
work.
Currently, our corporate web server is IIS 5.0 on a Win2K Pro Server in our
DMZ. (We are upgrading to IIS 6 / Win2003 Pro Server next month.) I need
to manage access to a handful of subfolders in the website. The subfolders
contain .html, .asp, and .pdf files.
Will IIS 5.0 support ASP .Net's built in methods for the integrated form
based authentication approach? (The .Net Framework, ver 1.1, is installed).
Obviously, I could go the classic ASP approach and place code in the top of
each page to do some kind of check for authentication. If the check
passes, generate the page, else redirect to the login. However, I'd prefer
to not have to modify every page.
Assuming that setup will work, how will an ASP .NET form based
authentication manage access to .pdf files and static .html files?
At this point, please don't send any code. I'd just appreciate a response
as to whether this is possible and it if it is, what's the best approach to
make it happen.
Thanks kindly,
-JoeAFAIK, forms based authentication is used only to control access to pages in
your ASP.NET application. It simply works by testing to see if you have a
valid ticket for the current session (usually set once login is successful)
if there isn't one then the user is redirected to a login page, usually
defined in the Web.Config file.
Access to files via a direct URL will, I think, only be controlled by the
filesystem access allowed to the directory in question, so I there is a
security restrictions in place then the user might be prompted to enter
their credentials into a windows dialog box.
Hope that help a bit.
IIS 5 does indeed support ASP.NET 1.1 and all that goes with it.
MattC
"Joe Rigley" <jcrigley@.spartanmotors.com> wrote in message
news:unlXnGfOFHA.2604@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I'd appreciate some advise... I've been assigned the task of creating
> form based authentication via SQL Server for a section of our corporate
> web site. I know classic ASP quite well, but the ASP .NET world is very
> different. And from what I've read, ASP .NET has some great functionality
> built into it for form based authentication. What I'd like to know is how
> to make this work.
> Currently, our corporate web server is IIS 5.0 on a Win2K Pro Server in
> our DMZ. (We are upgrading to IIS 6 / Win2003 Pro Server next month.) I
> need to manage access to a handful of subfolders in the website. The
> subfolders contain .html, .asp, and .pdf files.
> Will IIS 5.0 support ASP .Net's built in methods for the integrated form
> based authentication approach? (The .Net Framework, ver 1.1, is
> installed). Obviously, I could go the classic ASP approach and place code
> in the top of each page to do some kind of check for authentication. If
> the check passes, generate the page, else redirect to the login. However,
> I'd prefer to not have to modify every page.
> Assuming that setup will work, how will an ASP .NET form based
> authentication manage access to .pdf files and static .html files?
> At this point, please don't send any code. I'd just appreciate a response
> as to whether this is possible and it if it is, what's the best approach
> to make it happen.
> Thanks kindly,
> -Joe
>
On Tue, 05 Apr 2005 10:11:12 -0500, Joe Rigley
<jcrigley@.spartanmotors.com> wrote:

> Hi,
> I'd appreciate some advise... I've been assigned the task of creating
> form
> based authentication via SQL Server for a section of our corporate web
> site.
> I know classic ASP quite well, but the ASP .NET world is very different.
> And from what I've read, ASP .NET has some great functionality built
> into it
> for form based authentication. What I'd like to know is how to make this
> work.
> Currently, our corporate web server is IIS 5.0 on a Win2K Pro Server in
> our
> DMZ. (We are upgrading to IIS 6 / Win2003 Pro Server next month.) I
> need
> to manage access to a handful of subfolders in the website. The
> subfolders
> contain .html, .asp, and .pdf files.
> Will IIS 5.0 support ASP .Net's built in methods for the integrated form
> based authentication approach? (The .Net Framework, ver 1.1, is
> installed).
> Obviously, I could go the classic ASP approach and place code in the top
> of
> each page to do some kind of check for authentication. If the check
> passes, generate the page, else redirect to the login. However, I'd
> prefer
> to not have to modify every page.
> Assuming that setup will work, how will an ASP .NET form based
> authentication manage access to .pdf files and static .html files?
> At this point, please don't send any code. I'd just appreciate a
> response
> as to whether this is possible and it if it is, what's the best approach
> to
> make it happen.
> Thanks kindly,
> -Joe
>
I'd recommend reading up on Forms Authentication; it does exactly what you
would want to do in ASP. It sets a cookie on the user's system to say
whether they are logged in or not; if not they are sent to the login
page. In addition, you may want to check out the concept 'impersonation'
if it's something that may be useful here (intranet application?).
As far as non-aspnet files, as mentioned, IIS by default will be the one
to determine permissions on the folder, files, etc. When a request comes
in for an aspx file, IIS looks up aspx in the ISAPI dll mappings in MMC,
and passes it to the aspnet ISAPI dll (which in essence passes it to the
aspnet worker process). However, if it's not a .NET-type of file such as
html, pdf, etc. IIS will do whatever is setup in the MMC for ISAPI dll
mappings. Which as we know html and pdf are just served up to the user.
You can map the aspnet ISAPI dll to these other file extensions in IIS,
and then Forms Authentication can also protect them. Note there was talk
there may be performance hits and/or maybe corruption problems by doing
this (aspnet handling non-aspnet files), though I've never actually heard
of major problems with it.
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Hi Joe,
Good thinking. I think you will do well with ASP.Net. That said, however, if
you don't have any experience with ASP.Net, you should think about how long
you have to write your app. Just learining ASP.Net could take you several
months, or perhaps longer. It's huge.
If you have plenty of time, by all means, jump in! The water's great!
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
What You S Is What You Get.
"Joe Rigley" <jcrigley@.spartanmotors.com> wrote in message
news:unlXnGfOFHA.2604@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I'd appreciate some advise... I've been assigned the task of creating
> form based authentication via SQL Server for a section of our corporate
> web site. I know classic ASP quite well, but the ASP .NET world is very
> different. And from what I've read, ASP .NET has some great functionality
> built into it for form based authentication. What I'd like to know is how
> to make this work.
> Currently, our corporate web server is IIS 5.0 on a Win2K Pro Server in
> our DMZ. (We are upgrading to IIS 6 / Win2003 Pro Server next month.) I
> need to manage access to a handful of subfolders in the website. The
> subfolders contain .html, .asp, and .pdf files.
> Will IIS 5.0 support ASP .Net's built in methods for the integrated form
> based authentication approach? (The .Net Framework, ver 1.1, is
> installed). Obviously, I could go the classic ASP approach and place code
> in the top of each page to do some kind of check for authentication. If
> the check passes, generate the page, else redirect to the login. However,
> I'd prefer to not have to modify every page.
> Assuming that setup will work, how will an ASP .NET form based
> authentication manage access to .pdf files and static .html files?
> At this point, please don't send any code. I'd just appreciate a response
> as to whether this is possible and it if it is, what's the best approach
> to make it happen.
> Thanks kindly,
> -Joe
>
Craig,
Thanks for the great information. You mentioned Impersonation. How would
that help me?
-Joe
"Craig Deelsnyder" <cdeelsny@.no_spam_4_meyahoo.com> wrote in message
news:op.sorovfme75dg5d@.deelscwxp2.na.corp.born.com...
> On Tue, 05 Apr 2005 10:11:12 -0500, Joe Rigley
> <jcrigley@.spartanmotors.com> wrote:
>
> I'd recommend reading up on Forms Authentication; it does exactly what you
> would want to do in ASP. It sets a cookie on the user's system to say
> whether they are logged in or not; if not they are sent to the login
> page. In addition, you may want to check out the concept 'impersonation'
> if it's something that may be useful here (intranet application?).
> As far as non-aspnet files, as mentioned, IIS by default will be the one
> to determine permissions on the folder, files, etc. When a request comes
> in for an aspx file, IIS looks up aspx in the ISAPI dll mappings in MMC,
> and passes it to the aspnet ISAPI dll (which in essence passes it to the
> aspnet worker process). However, if it's not a .NET-type of file such as
> html, pdf, etc. IIS will do whatever is setup in the MMC for ISAPI dll
> mappings. Which as we know html and pdf are just served up to the user.
> You can map the aspnet ISAPI dll to these other file extensions in IIS,
> and then Forms Authentication can also protect them. Note there was talk
> there may be performance hits and/or maybe corruption problems by doing
> this (aspnet handling non-aspnet files), though I've never actually heard
> of major problems with it.
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET
On Tue, 05 Apr 2005 14:46:35 -0500, Joe Rigley
<jcrigley@.spartanmotors.com> wrote:

> Craig,
> Thanks for the great information. You mentioned Impersonation. How
> would
> that help me?
> -Joe
>
Ah, I got a little carried away, you pry won't need it for what you
described, but it is helpful to know about in case you need some forms of
resource access control:
http://msdn.microsoft.com/library/d...personation.asp
http://msdn.microsoft.com/library/d...personation.asp
basically it's a way to have aspnet use the credentials of the current
user, making it easier to do things such as access files, etc. Don't
think you need it, but useful to know for future reference
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Newbie Needs Help!

Hi,

I'd appreciate some advise... I've been assigned the task of creating form
based authentication via SQL Server for a section of our corporate web site.
I know classic ASP quite well, but the ASP .NET world is very different.
And from what I've read, ASP .NET has some great functionality built into it
for form based authentication. What I'd like to know is how to make this
work.

Currently, our corporate web server is IIS 5.0 on a Win2K Pro Server in our
DMZ. (We are upgrading to IIS 6 / Win2003 Pro Server next month.) I need
to manage access to a handful of subfolders in the website. The subfolders
contain .html, .asp, and .pdf files.

Will IIS 5.0 support ASP .Net's built in methods for the integrated form
based authentication approach? (The .Net Framework, ver 1.1, is installed).
Obviously, I could go the classic ASP approach and place code in the top of
each page to do some kind of check for authentication. If the check
passes, generate the page, else redirect to the login. However, I'd prefer
to not have to modify every page.

Assuming that setup will work, how will an ASP .NET form based
authentication manage access to .pdf files and static .html files?

At this point, please don't send any code. I'd just appreciate a response
as to whether this is possible and it if it is, what's the best approach to
make it happen.

Thanks kindly,
-JoeAFAIK, forms based authentication is used only to control access to pages in
your ASP.NET application. It simply works by testing to see if you have a
valid ticket for the current session (usually set once login is successful)
if there isn't one then the user is redirected to a login page, usually
defined in the Web.Config file.

Access to files via a direct URL will, I think, only be controlled by the
filesystem access allowed to the directory in question, so I there is a
security restrictions in place then the user might be prompted to enter
their credentials into a windows dialog box.

Hope that help a bit.

IIS 5 does indeed support ASP.NET 1.1 and all that goes with it.

MattC
"Joe Rigley" <jcrigley@.spartanmotors.com> wrote in message
news:unlXnGfOFHA.2604@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I'd appreciate some advise... I've been assigned the task of creating
> form based authentication via SQL Server for a section of our corporate
> web site. I know classic ASP quite well, but the ASP .NET world is very
> different. And from what I've read, ASP .NET has some great functionality
> built into it for form based authentication. What I'd like to know is how
> to make this work.
> Currently, our corporate web server is IIS 5.0 on a Win2K Pro Server in
> our DMZ. (We are upgrading to IIS 6 / Win2003 Pro Server next month.) I
> need to manage access to a handful of subfolders in the website. The
> subfolders contain .html, .asp, and .pdf files.
> Will IIS 5.0 support ASP .Net's built in methods for the integrated form
> based authentication approach? (The .Net Framework, ver 1.1, is
> installed). Obviously, I could go the classic ASP approach and place code
> in the top of each page to do some kind of check for authentication. If
> the check passes, generate the page, else redirect to the login. However,
> I'd prefer to not have to modify every page.
> Assuming that setup will work, how will an ASP .NET form based
> authentication manage access to .pdf files and static .html files?
> At this point, please don't send any code. I'd just appreciate a response
> as to whether this is possible and it if it is, what's the best approach
> to make it happen.
> Thanks kindly,
> -Joe
On Tue, 05 Apr 2005 10:11:12 -0500, Joe Rigley
<jcrigley@.spartanmotors.com> wrote:

> Hi,
> I'd appreciate some advise... I've been assigned the task of creating
> form
> based authentication via SQL Server for a section of our corporate web
> site.
> I know classic ASP quite well, but the ASP .NET world is very different.
> And from what I've read, ASP .NET has some great functionality built
> into it
> for form based authentication. What I'd like to know is how to make this
> work.
> Currently, our corporate web server is IIS 5.0 on a Win2K Pro Server in
> our
> DMZ. (We are upgrading to IIS 6 / Win2003 Pro Server next month.) I
> need
> to manage access to a handful of subfolders in the website. The
> subfolders
> contain .html, .asp, and .pdf files.
> Will IIS 5.0 support ASP .Net's built in methods for the integrated form
> based authentication approach? (The .Net Framework, ver 1.1, is
> installed).
> Obviously, I could go the classic ASP approach and place code in the top
> of
> each page to do some kind of check for authentication. If the check
> passes, generate the page, else redirect to the login. However, I'd
> prefer
> to not have to modify every page.
> Assuming that setup will work, how will an ASP .NET form based
> authentication manage access to .pdf files and static .html files?
> At this point, please don't send any code. I'd just appreciate a
> response
> as to whether this is possible and it if it is, what's the best approach
> to
> make it happen.
> Thanks kindly,
> -Joe

I'd recommend reading up on Forms Authentication; it does exactly what you
would want to do in ASP. It sets a cookie on the user's system to say
whether they are logged in or not; if not they are sent to the login
page. In addition, you may want to check out the concept 'impersonation'
if it's something that may be useful here (intranet application?).

As far as non-aspnet files, as mentioned, IIS by default will be the one
to determine permissions on the folder, files, etc. When a request comes
in for an aspx file, IIS looks up aspx in the ISAPI dll mappings in MMC,
and passes it to the aspnet ISAPI dll (which in essence passes it to the
aspnet worker process). However, if it's not a .NET-type of file such as
html, pdf, etc. IIS will do whatever is setup in the MMC for ISAPI dll
mappings. Which as we know html and pdf are just served up to the user.

You can map the aspnet ISAPI dll to these other file extensions in IIS,
and then Forms Authentication can also protect them. Note there was talk
there may be performance hits and/or maybe corruption problems by doing
this (aspnet handling non-aspnet files), though I've never actually heard
of major problems with it.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Hi Joe,

Good thinking. I think you will do well with ASP.Net. That said, however, if
you don't have any experience with ASP.Net, you should think about how long
you have to write your app. Just learining ASP.Net could take you several
months, or perhaps longer. It's huge.

If you have plenty of time, by all means, jump in! The water's great!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"Joe Rigley" <jcrigley@.spartanmotors.com> wrote in message
news:unlXnGfOFHA.2604@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I'd appreciate some advise... I've been assigned the task of creating
> form based authentication via SQL Server for a section of our corporate
> web site. I know classic ASP quite well, but the ASP .NET world is very
> different. And from what I've read, ASP .NET has some great functionality
> built into it for form based authentication. What I'd like to know is how
> to make this work.
> Currently, our corporate web server is IIS 5.0 on a Win2K Pro Server in
> our DMZ. (We are upgrading to IIS 6 / Win2003 Pro Server next month.) I
> need to manage access to a handful of subfolders in the website. The
> subfolders contain .html, .asp, and .pdf files.
> Will IIS 5.0 support ASP .Net's built in methods for the integrated form
> based authentication approach? (The .Net Framework, ver 1.1, is
> installed). Obviously, I could go the classic ASP approach and place code
> in the top of each page to do some kind of check for authentication. If
> the check passes, generate the page, else redirect to the login. However,
> I'd prefer to not have to modify every page.
> Assuming that setup will work, how will an ASP .NET form based
> authentication manage access to .pdf files and static .html files?
> At this point, please don't send any code. I'd just appreciate a response
> as to whether this is possible and it if it is, what's the best approach
> to make it happen.
> Thanks kindly,
> -Joe
Craig,

Thanks for the great information. You mentioned Impersonation. How would
that help me?

-Joe

"Craig Deelsnyder" <cdeelsny@.no_spam_4_meyahoo.com> wrote in message
news:op.sorovfme75dg5d@.deelscwxp2.na.corp.born.com ...
> On Tue, 05 Apr 2005 10:11:12 -0500, Joe Rigley
> <jcrigley@.spartanmotors.com> wrote:
>> Hi,
>>
>> I'd appreciate some advise... I've been assigned the task of creating
>> form
>> based authentication via SQL Server for a section of our corporate web
>> site.
>> I know classic ASP quite well, but the ASP .NET world is very different.
>> And from what I've read, ASP .NET has some great functionality built
>> into it
>> for form based authentication. What I'd like to know is how to make this
>> work.
>>
>> Currently, our corporate web server is IIS 5.0 on a Win2K Pro Server in
>> our
>> DMZ. (We are upgrading to IIS 6 / Win2003 Pro Server next month.) I
>> need
>> to manage access to a handful of subfolders in the website. The
>> subfolders
>> contain .html, .asp, and .pdf files.
>>
>> Will IIS 5.0 support ASP .Net's built in methods for the integrated form
>> based authentication approach? (The .Net Framework, ver 1.1, is
>> installed).
>> Obviously, I could go the classic ASP approach and place code in the top
>> of
>> each page to do some kind of check for authentication. If the check
>> passes, generate the page, else redirect to the login. However, I'd
>> prefer
>> to not have to modify every page.
>>
>> Assuming that setup will work, how will an ASP .NET form based
>> authentication manage access to .pdf files and static .html files?
>>
>> At this point, please don't send any code. I'd just appreciate a
>> response
>> as to whether this is possible and it if it is, what's the best approach
>> to
>> make it happen.
>>
>> Thanks kindly,
>> -Joe
>>
>>
> I'd recommend reading up on Forms Authentication; it does exactly what you
> would want to do in ASP. It sets a cookie on the user's system to say
> whether they are logged in or not; if not they are sent to the login
> page. In addition, you may want to check out the concept 'impersonation'
> if it's something that may be useful here (intranet application?).
> As far as non-aspnet files, as mentioned, IIS by default will be the one
> to determine permissions on the folder, files, etc. When a request comes
> in for an aspx file, IIS looks up aspx in the ISAPI dll mappings in MMC,
> and passes it to the aspnet ISAPI dll (which in essence passes it to the
> aspnet worker process). However, if it's not a .NET-type of file such as
> html, pdf, etc. IIS will do whatever is setup in the MMC for ISAPI dll
> mappings. Which as we know html and pdf are just served up to the user.
> You can map the aspnet ISAPI dll to these other file extensions in IIS,
> and then Forms Authentication can also protect them. Note there was talk
> there may be performance hits and/or maybe corruption problems by doing
> this (aspnet handling non-aspnet files), though I've never actually heard
> of major problems with it.
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET
On Tue, 05 Apr 2005 14:46:35 -0500, Joe Rigley
<jcrigley@.spartanmotors.com> wrote:

> Craig,
> Thanks for the great information. You mentioned Impersonation. How
> would
> that help me?
> -Joe

Ah, I got a little carried away, you pry won't need it for what you
described, but it is helpful to know about in case you need some forms of
resource access control:

http://msdn.microsoft.com/library/d...personation.asp

http://msdn.microsoft.com/library/d...personation.asp

basically it's a way to have aspnet use the credentials of the current
user, making it easier to do things such as access files, etc. Don't
think you need it, but useful to know for future reference

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

NEWBIE needs helps about creating links

From: "Enes Kabacaoglu" <eneskbc@dotnet.itags.org.gmail.com>
To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@dotnet.itags.org.googlegroups.com>
Subject: NEWBIE needs help for creating links
Date: Sat, 24 Dec 2005 17:42:34 -0800

Hi :
Firstly, i am sorry for stealing your time for this easy problem of
mine, but i crashed.

I have a datalist, and i show a small pic and a little about the news,
in it. There is a details link at bottom. I want to carry the news_id
and news_category informations to details page, but i could not ! As a
summary i need this kind of thing :

http://www.mysite.com/newsdetails.a...category=health

I have used an 'asp :Hyperlink' but for databound method of this item,
i could only carry news_id. How can i carry more? Which tool to choose,
and how?

By the way i am an VisualStudio 2005 (Rel.Can) user.

Thanks for your helps.
Best RegardsTry either one of the following, either one should work:

<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%# "http://www.mysite.com/newsdetails.aspx?news_id="
& Server.UrlEncode(Container.DataItem.news_id) & "&news_category=" &
Server.UrlEncode(Container.DataItem.news_category) %>'
<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%#
String.Format("http://www.mysite.com/newsdetails.aspx?news_id={0}&news_category={1}",
Server.UrlEncode(Container.DataItem.news_id),
Server.UrlEncode(Container.DataItem.news_category) ) %>'
Good Luck!
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/

"Enes Kabacaoglu" <eneskbc@.gmail.com> wrote in message
news:1135475065.426723.31940@.z14g2000cwz.googlegro ups.com...
> From: "Enes Kabacaoglu" <eneskbc@.gmail.com>
> To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@.googlegroups.com>
> Subject: NEWBIE needs help for creating links
> Date: Sat, 24 Dec 2005 17:42:34 -0800
> Hi :
> Firstly, i am sorry for stealing your time for this easy problem of
> mine, but i crashed.
> I have a datalist, and i show a small pic and a little about the news,
> in it. There is a details link at bottom. I want to carry the news_id
> and news_category informations to details page, but i could not ! As a
> summary i need this kind of thing :
> http://www.mysite.com/newsdetails.a...category=health
> I have used an 'asp :Hyperlink' but for databound method of this item,
> i could only carry news_id. How can i carry more? Which tool to choose,
> and how?
> By the way i am an VisualStudio 2005 (Rel.Can) user.
> Thanks for your helps.
> Best Regards

NEWBIE needs helps about creating links

From: "Enes Kabacaoglu" <eneskbc@dotnet.itags.org.gmail.com>
To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@dotnet.itags.org.googlegroups.com>
Subject: NEWBIE needs help for creating links
Date: Sat, 24 Dec 2005 17:42:34 -0800
Hi :
Firstly, i am sorry for stealing your time for this easy problem of
mine, but i crashed.
I have a datalist, and i show a small pic and a little about the news,
in it. There is a details link at bottom. I want to carry the news_id
and news_category informations to details page, but i could not ! As a
summary i need this kind of thing :
http://www.mysite.com/newsdetails.a...category=health
I have used an 'asp :Hyperlink' but for databound method of this item,
i could only carry news_id. How can i carry more? Which tool to choose,
and how?
By the way i am an VisualStudio 2005 (Rel.Can) user.
Thanks for your helps.
Best RegardsTry either one of the following, either one should work:
<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%# "http://www.mysite.com/newsdetails.aspx?news_id="
& Server.UrlEncode(Container.DataItem.news_id) & "&news_category=" &
Server.UrlEncode(Container.DataItem.news_category) %>'>
<asp:HyperLink id="lnknewsdetails" runat="server" Text="Details For This
Article" NavigateUrl='<%#
String.Format("http://www.mysite.com/newsdetails.aspx?news_id={0}&news_categ
ory={1}",
Server.UrlEncode(Container.DataItem.news_id),
Server.UrlEncode(Container.DataItem.news_category)) %>'>
Good Luck!
--
Nathan Sokalski
njsokalski@.hotmail.com
http://www.nathansokalski.com/
"Enes Kabacaoglu" <eneskbc@.gmail.com> wrote in message
news:1135475065.426723.31940@.z14g2000cwz.googlegroups.com...
> From: "Enes Kabacaoglu" <eneskbc@.gmail.com>
> To: "Community of ASP.NET 2.0" <aspnet-lcnetwork@.googlegroups.com>
> Subject: NEWBIE needs help for creating links
> Date: Sat, 24 Dec 2005 17:42:34 -0800
> Hi :
> Firstly, i am sorry for stealing your time for this easy problem of
> mine, but i crashed.
> I have a datalist, and i show a small pic and a little about the news,
> in it. There is a details link at bottom. I want to carry the news_id
> and news_category informations to details page, but i could not ! As a
> summary i need this kind of thing :
> http://www.mysite.com/newsdetails.a...category=health
> I have used an 'asp :Hyperlink' but for databound method of this item,
> i could only carry news_id. How can i carry more? Which tool to choose,
> and how?
> By the way i am an VisualStudio 2005 (Rel.Can) user.
> Thanks for your helps.
> Best Regards
>