|
Yes.. that's what I forget, Server.MapPath
Many thanks
"Courage choose who will follow, Fate choose who will lead" - Lord Gunner, Septerra Core
"Press any key to continue, where's the ANY key ?" - Homer Simpsons
Drinking gives me amazing powers of insight. I can solve all the worlds problems when drunk, but can never remember the solutions in the morning. - Michael P Butler to Paul Watson on 12/08/03
|
|
|
|
|
I have seen websites where all the pages have the suffix
.asp and I have seen websites where all the pages have
the suffix .htm. Is there a difference between the two
files?
What really bothers me is I have a site where everything
is .asp and when I send this robot to crawl the site and
find all links, it only finds the first page. I want
google and other search engines to crawl all the pages
(and subpages of the site) and the .asp suffix seems to
hinder it.
Am I just imagining this or is something really different
between those suffixes?
Please, any response any one can give me will be greatly
appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
The suffix is a clue as to what inline scripting language the site uses (e.g. .asp, .php, .shtml, etc.), but is by no means definitive (the web server can be configured map any suffix to any handler). .htm is usually just plain HTML, but on a platform with historical roots to three-character file extensions (e.g., Windows).
I doubt the .asp extension is hindering the web crawler, unless it is poorly designed. However, there are lots of reasons why a web crawler for a search engine (such as Google) may not completely cover your site. Are all of your internal links of the form "blah.asp?something "? If so, the crawler is probably avoiding following the link since it suggests that the link is dynamic and the bot designers don't want the bot to waste server resources by triggerring a potentially intensive query. Also, a robots.txt file may be instructing the bot to specifically ignore certain sections.
- Mike
|
|
|
|
|
the extension tells the server what type of processing it must do to the file before it sends it to your browser. HTML and HTM files require no server-side processing and are simply sent as-they-are to your browser. ASP files use the VBScript or JScript server-side scripting language, and the server will look through these files for any script code and process it first before sending the resultant HTML to your browser. PHP files are the same idea, but use a different language.
Search engines are not a straight-forward technology. There are entire business devoted to optimising people's sites to please the search engines. What have you used to build the site? Search engines can't navigate flash files in general, and if you use a cryptic method to link to your subpages they may also have trouble. Do you use frames? These can cause problems also. What's the URL of your website? If we can have a look, you might get some better help.
NATHAN RIDLEY
Web Application Developer
email: nathan @ netlab.com.au
[remove the spaces before and after the @ symbol]
|
|
|
|
|
Hi there!
I'm most certain this topic has been discussed previously hundreds of times, yet I have a little problem with this which probably deserves a new thread:
I built a few days ago a regular expression email verification (actually copy-pasted it from some place I can't remember now :-P) to be used to filter email input in a web-page I'm working on.
Yesterday my boss called very angry because one of his clients wasn't able to enter his email. Obviously the client's email was a valid one and my function was rejecting it, so I have to correcti it. The problem was my regexp wasn't allowing the address to start with a digit (doh!):
^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$
Ok, solving this is most easy, but my boss was so damn angry, he told me to be absolutely sure all valid email addresses will be accepted when I fix it... so I made my homework... I ran into RFC2821 and RFC821 to check out SMTP rules, and found something weird:
According to RFC821 (http://www.faqs.org/rfcs/rfc821.html), the syntax for the email address is as follows (check the original RFC821 for a complete explanation, I'm filtering out a lot of stuff here):
<mailbox> ::= <local-part> "@" <domain>
<local-part> ::= <dot-string> | <quoted-string>
<dot-string> ::= <string> | <string> "." <dot-string>
<string> ::= <char> | <char> <string>
<char> ::= <c> | "\" <x>
<c> ::= any one of the 128 ASCII characters, but not any <special> or <SP>
<x> ::= any one of the 128 ASCII characters (no exceptions)
<SP> ::= the space character (ASCII code 32)
<special> ::= "<" | ">" | "(" | ")" | "[" | "]" | "\" | "." | "," | ";" | ":" | "@" """ | the control characters (ASCII codes 0 through 31 inclusive and 127)
The logic to understand the previous is rather simple: <mailbox> is composed of <local-part> AND "@" AND <domain>. Then <local-part> is composed of <dot-string> OR <quoted-string>, and so on. I left <quoted-string> and <domain> out of this because the quoted-string is a more complex notation for the same thing, and domain suffers of the same problem I'll explain now:
If you check the ASCII table, and filter out the INVALID characters according to the previous rules (not taking in count that quoting a char with backslash -i.e. \% - allows to enter ANY character), the valid set of characters for an email address is (values in parenthesis are ASCII codes):
letters: a - z AND A - Z
digits : 0 - 9
extras : ! (33), # (35), $ (36), % (37), & (38), ' (39), * (42), + (43), - (45), / (47), = (61), ? (63), \ (92), ^ (94), _ (95), { (123), | (124), } (125), ~ (126)
Now let's review this: letters, no problem... digits, no problem... but hey!!... what happened with the extra symbols?? I'm not complaining about 45, 95 (which are very common in email addresses) but the remaining are ALSO VALID?? Could this be possible?
Now, I can build a regexp to accept all this "extra" symbols, but my question here is ARE THEY ACTUALLY VALID? most of all ARE THEY VALID ANYWHERE IN THE SYNTAX?
I hope someone has the patience to read all this and give any comments about this.
Bundy
|
|
|
|
|
I think yes, they are allowed. Just as a sample, Lotus Notes often generates e-mails using:
! (33), # (35), $ (36), % (37), & (38), / (47)
Although I never saw the others, what's the problem with this? If it's allowed by the RFC, then it should be only a matter of using them on your regex.
BTW, do you know about RegexLib.com? You have a good probability of finding the regex you need there.
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
Jeff Friedl provides exactly such a regex conforming to RFC821 in his book, Mastering Regular Expressions, and the regex can be found here:
http://public.yahoo.com/~jfriedl/regex/code.html[^]
There is an expanded version of the regex in the Email::Valid Perl module.
- Mike
|
|
|
|
|
Thanks a lot guys!! that really helped a lot (although the regexp found at that url was built in perl and I'm working with asp, but I can do it myself anyway ).
I was most worried about this because some of those simbols are often used when some people with too much time on their hands try to hack a web by cross-scripting, so those simbols are considered somewhat "harmful", but with the special characters out of question ("<" ">" "\") not much harm can be done.
Thanks again!!
Bundy
|
|
|
|
|
Hi, first of all, thanx for reading my message.
I need an application like xpwebbuttons to develop a very impressive and beautiful buttons with xp-like and mac-like. I know how to design on Photoshop but I don't like my results at all. Please if anyone knows a program like xpwebbuttons and for free...
Thanks in advance.
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Hi,
I've created a little webservice.
I want to query, update and delete datas from 2 tables
So I've created a SQLConnection and a SQLDataAdapter.
The problem is with the SQLDataAdapter. I don't know how to tell .Net that the 2 tables are linked and must work togheter.
I've tried to made this with the "Configure Data Adapter Wizard" but it doesn't work.
Any1 know good idea to help me ?
regards
Sybux
|
|
|
|
|
Hi ,
If you want to link 2 tables you can use dataset for that.
In the dataset itself you will have to define that relationship .
something like this
custDS.Relations.Add("CustOrders",
custDS.Tables["Customers"].Columns["CustID"],
custDS.Tables["Orders"].Columns["CustID"]);
I hope you are asking about this only.
thanks
|
|
|
|
|
Hi all,
Iam facing a problem while populating data into Microsoft tree view control(ActiveX control) in ASP. Iam able to populate the data but all the data is visible as parent node. Can anyone help me out of this situation. Its very urgent.
Thanks in advance.
The code iam using is as follows
--------------------------------------------------
sub treeview_Load()
set oList = document.treeview1
Dim nodX
Set nodX = oList.Nodes.Add(, , "dad", "Mike") ' A first sibling.
Set nodX = oList.Nodes.Add(, , "mom", "Carol")
Set nodX = oList.Nodes.Add(, , , "Alice")
' Marsha is the FirstSibling.
Set nodX = oList1.Nodes.Add("mom", tvwChild, , "Marsha")
Set nodX = oList1.Nodes.Add("mom", tvwChild, , "Jan")
Set nodX = oList1.Nodes.Add("mom", tvwChild, , "Cindy")
nodX.EnsureVisible ' Show all nodes.
' Greg is the FirstSibling.
Set nodX = oList1.Nodes.Add("dad", tvwChild, , "Greg")
Set nodX = oList1.Nodes.Add("dad", tvwChild, , "Peter")
Set nodX = oList1.Nodes.Add("dad", tvwChild, , "Bobby")
nodX.EnsureVisible ' Show all nodes.
end sub
|
|
|
|
|
Hey guys, what's up? Just set up my remote server (using semi-isolated development mode) for web projects (namely C# ASP.NET projects), and found the info about updating to FPSE 2002.
I didn't think I -needed- FPSE, except that I don't want to run IIS on my development PC (Win2kPro). So I'm using my test server (Win2kServer) as a remote web server. Wound up with a ton of error messages (well, actually, only two), and found the answer in Microsoft KB # 320451. So apparently I need FPSE, because I really don't want IIS locally.
Anyway- should I upgrade the test server to FPSE 2002? Anyone done this? Any problems with it?
Or... like I said, I really don't want IIS running locally. But- I much rather like the idea of talking to my test server via a file share (wwwroot$). Would the ability to use a file share work if I installed IIS locally- but stopped the "World Wide Web Publishing Service" and the "IIS Admin Service"? That way, IIS gets installed on my client computer, but I'm wondering if ADSI (Active Directory Service Interfaces) would still work. The KB says it's integrated with IIS, but I'm not sure how. Did anybody try this? Or, /could/ anybody try this for me? I just tried to create a C# ASP.NET web application, and wound up with both of the error messages that KB #320451 talks about.
Oh, let me link up KB 320451 - click here for the article!
Thanks!!
-Thomas
|
|
|
|
|
ThomasH1 wrote:
upgrade the test server to FPSE 2002? Anyone done this? Any problems with it
I'm running Win2K Server and I tried using the latest 2002 version of FP Extensions on IIS. It killed my server.
"Your village called - They're missing their idiot."
|
|
|
|
|
Roger, thanks for the info!! I'll forget about FPSE 2002!
Do you use FrontPage to create your web projects? Just wondering if you know anything about my question regarding IIS (installing it locally but keeping the services and web page stopped, just to get the Active Directory Service Interfaces component installed.).
Thanks!
-Thomas
|
|
|
|
|
I didn't understand what you're trying to accomplish by installing IIS but leaving it off, so I didn't address that part. I leave IIS running all the time, but redirect the home directory to a different drive and host only one file on the default site (essentially a 'go away' page). Turning it off is no problem, but I suspect that the ADSI thing needs pages that are served, rather than merely shared. It's worth a try, though - I can't see that it would harm anything to try it.
"Your village called - They're missing their idiot."
|
|
|
|
|
I'm trying to follow the semi-isolated model of development, as written up in Microsoft's "Patterns & Practices" series. Find that document here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/tdlg_ch2.asp. Find another similar writeup here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vetchWebProjectsSourceControlIntegrationInVisualStudioNET.asp.
So according to that KB 320451, IIS needs to be installed in order to get the ADSI component installed, and the IIS5 docs say that the IIS Admin Object exposes ADSI methods to configure the remote web server. But I don't want IIS running... so I was hoping that I could install IIS locally, keep it off, but get the ADSI functionality that would "find" my remote webserver.
Well, I gave it a shot, and I was wrong- on ALL counts. I installed IIS, kept all services and the default web page running, but still got the error messages from KB 320451.
For kicks I tried my idea of shutting all of IIS down and trying to create a web project, of course, the same error messages came up.
So apparently my computer doesn't like ADSI at all, and I can't use the file share option for creating a web project.
But... now I'm wondering if it's because of my domain layout. I work in two domains- production and test. Each domain has it's own DNS server, the two domains are completely isolated from each other. My workstation PC (Win2kPro) is a member of the production domain. I can access the test domain thru exploring "my network places", or doing a start/run/\\servername.
And then I'm back thinking to Active Directory Service Interfaces. The only Active Directory that I can see by exploring "My network places" is the ad for the production domain. I can't see any ad for the test doman. So that makes me wonder if my file share method is failing because VS.NET is search the Production domain for my remote web server, when in fact, it should be searching the Test domain!
Ugh. I'm a 1/2 step away from calling Microsoft on this one. This wasn't a big deal with Visual Studio 6.0, but then again, when I developed my ASP apps, I used Interdev 6.0 to just create standalone files on a share from the test domain- I never used Interdev to create an actual application via FrontPage.
The shame is that the best practice for using Visual SourceSafe is via a file share... which I can't seem to set up.
Thanks for the help!! If you (or anyone else!) has any other ideas, please let me know! I'm wasting so much time on this that it's not even funny...
-Thomas
|
|
|
|
|
Just a thought (I haven't explored this at all) but I've noticed some new user accounts added since installing IIS and the server extensions. One, of course, is the IUSR account to allow web access from outside, but there are others that appear to be service accounts. Possibly some of these have to be given permission on the test domain for the running services to find those shares.
"Your village called - They're missing their idiot."
|
|
|
|
|
I double checked, and yep, I had added myself to all those groups. Looks like I'm SOL... I think my problem is that I'm trying to be a member of two domains. I think if I could see both active directory trees- or even just the tree for the test server, then my PC would be able to "find" the webserver (on the test domain).
I'm betting the only solution is to somehow create a forest between the two domains, but I really don't want to tie our production server into my test server. At least I figured out the error I was getting from FrontPage... it was telling me that "Unable to retrieve folder information from the server. Access forbidden." I finally traced it to something stupid... for the "Directory Security" tab of the "default web site" properties, I restricted the access to deny all but my subnet, and two other off-site ip addresses. Well, when a new project was made with Frontpage extensions, the new folder was taking ONLY the static IP's, not the subnet allowance. So I solved that one with a workaround; I just added my own static IP to the default web site's directory access, which actually wound up making my code a bit more secure. If I want anyone in my company to "use" my site, then I could give 'em access by their IP. So each new directory that Frontpage extensions creates has those three IP's, but it still neglects the subnet IP's- which doesn't bother me.
Tomorrow I might bring my laptop in, make it a member of the test domain (it's not a member of Any domain right now), and see if the file share option works 100%. I'll keep you (and codeproject.com) posted!
Thanks! Man, ya know, the setup of this environment was NOT supposed to be a pain; I figured the hard part would've been the coding and debugging. (laughs)
-Thomas
|
|
|
|
|
OK, that's it, I've had enough. Roger (& all who might be reading), I can't even debug the application with FPSE!! Get this; I can create the page fine, no problems; it asks me for a login to the test domain, and creates the page. When I try to run/debug the project, it logs me out of the test domain, and tries to re-login with my MAIN domain credentials!! And of course those fail! So it throws up an error message and tries to be helpful by saying "make sure you're a member of the debuggers group." My test domain account is, but of course my main domain account isn't (and I'm not about to create a forest to join the two domains)!
So, I've had it. I'm going to load and run IIS locally, run the Microsoft IIS lockdown tool on it, and be done with it.
I'm also going to swipe your idea, Roger, if you don't mind- making the web site into a "virtual directory" pointing to a share on the test server/domain. And then I'm going to redirect my default location for my local project info (my docs\visual studio projects) onto the Main domain. This way I'll be able to work from home.
So my test server will be what it was when I was running VS6.0, just a server/domain used for compatability testing and load testing and etc... no development integration. Won't be able to use Visual SourceSafe then, but I'll just resign myself to manual backups again.
Maybe I'll attack all this again when Whidbey comes out. Thanks again for your help RW!!
-Thomas
|
|
|
|
|
ThomasH1 wrote:
my test server will be what it was when I was running VS6.0
Sometimes the old ways are best.
"Your village called - They're missing their idiot."
|
|
|
|
|
Assume I have a database of 5,000,000 addresses (all opt-in) and there are 10 groups with variable number of emails belonging to them. I have to send all 5,000,000 every x number of days (could be 5, 10, 15, so on...).
Would it be best for me to send them manually one group after another, or should I send all at once and have the script queue remaining groups and have a cron service send them one after the other, as each group is finished, the other is started, kind of thing. I figure this way only a single process would be created for sending the emails and another process for accepting queueing other messages (i think). Otherwise I may have 10-15-20 scripts all competing to send emails at once which would tax the system I'm sure...
Opinions?
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Some things to consider:
* Is the information time sensitive? In other words if the emails are sent sequentially would the 5 millionth be at a disadvantage over the 1st recipient?
* You've not mentioned the software your using. That might help to find an answer. All software has its little quirks and some are better at handling a task in a certain way.
* What sort of hardware are you using? On a single processor server with limited memory running 20 scripts sequentially could quite easily tax it. But if you have large amounts of memory with multiple processors then it might work out okay if you have concurrently running scripts.
--Colin Mackay--
"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)
Enumerators in .NET: See how to customise foreach loops with C#
|
|
|
|
|
Hi, i'm developing a new website and I need some icons for a forum, chat and so on... I would like them to be XP like. Where can I find icons for free on the web ? Thanks on advance.
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Here's [^]one; try google for more.
"Your village called - They're missing their idiot."
|
|
|
|
|