 |
|
 |
I'm glad it worked for you.
|
|
|
|
 |
|
 |
Can't you create a unique GUID for the download and bind it to that user requiring a login to actually download the file?
EDIT: then you do something like /download.aspx?ID=b4367c00-238d-4071-bd7c-3a801ee0d9ad and use forms authentication to ensure that the file belongs to that user.
Todd Smith
modified on Tuesday, April 28, 2009 8:29 PM
|
|
|
|
 |
|
 |
I have the login stuff already implemented, and there's a downloads section on the user's home page with a list of all purchased products and a space for the link. However, once on that page, unless I have multiple copies of the file on the server side (one for each order), the moment the user is logged in and hovers over site.com/downloads/filename.mp3, that link can now be passed around to anyone else who can type it into their browser and download, thus bypassing the order mechanism.
Am I missing a piece of the puzzle here? I'm only on my first cup of coffee...
|
|
|
|
 |
|
 |
1) You want to remove read permissions on the /downloads directory so they can not access it directly 2) Create a download.aspx page and within that page you check if that user has permission to access that specific file 3) If they have permission then open the file and write it's contents to the HttpContext
Example (making it up on the fly):
protected void Page_Load (object sender, EventArgs e) { HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "something/mp3";
Stream stream = File.Create(filename, FileMode.Open); stream.Save(HttpContext.Current.Response); stream.Close(); }
Todd Smith
|
|
|
|
 |
|
 |
That makes sense. Thanks, man!
|
|
|
|
 |
|
 |
This approach works like a charm. I was so wrapped up in thinking about links, etc. that I'd completely forgotten about jiggling the response.
Thanks!
|
|
|
|
 |
|
 |
for those who didn't see the sarcasm dwelling from that tittle. I was being sarcastic
A little while ago someone mentioned http://99-bottles-of-beer.net/[^]. And I being a good Pavlov dog follow the irresistible link <shout mode> curse that bl**dy link <.shout mode>. What i saw was a great site containing more then 1200 programming languages, who when run, perform the 99 bottles of beer song. Some are real languages, some are derivatives of those and other settled in the esoteric section are just the fruit of some crazy programmers removing all brakes from there imagination (Piet, Whirl, Shakespeare, ...) Now guest to what section I would like to create a language for.
If you guessed the last one, you won. I'm using all my spare time, which wasn't already much, for this pet project. Hmm pet, Pet from Hell would be a better name. 
So again thanks a lot for mentioning the 99 bottles of beer site.
HAVE ... to ... NEED to code NOW .... AAARGHHHHH
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
 |
|
 |
BadKarma wrote: (Piet, Whirl, Shakespeare, ...) Funny, I just happened on Piet last night, following some other thread, totally unrelated to the bottles of beer thing. It's a serendipitous language.
|
|
|
|
 |
|
 |
Darn you, darn you to heck.
Fortunately the language that came to my mind when I read the same post would be fairly unsuited to the task so the temptation to try it is rather weak.
|
|
|
|
 |
|
 |
It remember me good times from a good friend[^]
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.(John 3:16) 
|
|
|
|
 |
|
 |
You'll burn in **** for mentioning him on here! Darn you to heck (where's Phil, the Prince of Insufficient Light?)!
|
|
|
|
 |
|
 |
Thanks.. you've just wasted half my day!
|
|
|
|
 |
|
 |
I wish it was just half a day for me, currently I have already spend 2 workdays at the office, and a more the 20 hours in night sessions on this.
But I think I have nailed my last issue (the imlpementation of a while loop), or at least I hope so.
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
 |
|
 |
You'll be publishing the results of your hard work so we can all share in the joy, and marvel at the birth of a new language, I trust?
|
|
|
|
 |
|
 |
I certainly will
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
 |
|
 |
&VarSet("BOBOTW", " bottles of beer on the wall. ") &VarSet("BOB", " bottles of beer. You take one down, pass it around, ") &VarSet("X", 99) &VarSet("Res", "") &Q(Join(Loop(Grtr(X, 0), VarSet("Res", JoinX(8, Res, X, BOBOTW, X, BOB, Sub(X,1), BOBOTW, "\n")), VarSet("X", Sub(X, 1))), " Bottles Of Beer!")) &T(Res)
that's done with a much-evolved version of my SAScript[^] language.
the output is:
"99 Bottles Of Beer!" 99 bottles of beer on the wall. 99 bottles of beer. You take one down, pass it around, 98 bottles of beer on the wall. 98 bottles of beer on the wall. 98 bottles of beer. You take one down, pass it around, 97 bottles of beer on the wall. 97 bottles of beer on the wall. 97 bottles of beer. You take one down, pass it around, 96 bottles of beer on the wall. 96 bottles of beer on the wall. 96 bottles of beer. You take one down, pass it around, 95 bottles of beer on the wall. 95 bottles of beer on the wall. 95 bottles of beer. You take one down, pass it around, 94 bottles of beer on the wall. 94 bottles of beer on the wall. 94 bottles of beer. You take one down, pass it around, 93 bottles of beer on the wall. 93 bottles of beer on the wall. 93 bottles of beer. You take one down, pass it around, 92 bottles of beer on the wall. 92 bottles of beer on the wall. 92 bottles of beer. You take one down, pass it around, 91 bottles of beer on the wall. .... etc
|
|
|
|
 |
|
 |
Does anyone here know anything about tinnitus? I have, for some reason, recently become more aware of mine, and more curious about it. It has been constant for many years, and never been a problem, but I feel compelled to at least investigate it.
|
|
|
|
 |
|
 |
I've had tinnitus for years, and researching it, I found that the medical community thinks high blood pressure or brain tumors are the most likely causes (neither of which I have) or exposure to loud sounds (possible). Other possibilities I came across are virus and various other obscure diseases.
I've done my own thinking about the problem and have come to two conclusions: 1) I suffer tinnitus only in the right ear, which is the ear I use for talking on the phone. I'm not blaming cell phones mind you, but as a correlation, I noticed this developing during a period of time when I was spending literally hours each day on the phone (cell, or headset, or Skype) with a client, a few years ago.
Second, (and no doctor's opinion here, just personal observation) I believe it correlates to pressure on my wisdom teeth, which only two have been removed, another two have sort of grown sideways or something. The teeth don't bother me, but the tinnitus seems to correlate to whether I give my jaw a workout, like eating beef jerky or something else that requires a lot of force to chew.
Marc
|
|
|
|
 |
|
 |
I've lived with it's constant company the last 20+ years. all the Otologist's I've seen tell me it's caused by nerve damage to the cochlea (from chronic over exposure to loud noise - I also have a "shooter's notch" in my hearing) and incurable. I've quit asking. It does vary in intensity from week to week. It increases during periods of stress, and sometimes almost (but not quite) completely vanishes. My primary care physician says i can expect it to follow my blood pressure to an small extent, so it serves as a reminder in the event I miss my blood pressure medication... As you point out, it is rarely more than a minor annoyance.
The shooter's notch is more of a bother, as it makes it quite difficult to understand female programmers of the Indian nationality - the pitch of their speech is smack in the middle of the least acute area of my hearing.
|
|
|
|
 |
|
 |
A strange 'feature' of mine is that I often hear it suddenly lower in frequency, sounding as if when you quite quickly turn down the frequency knob on a tone generator, sort of a eeeeeeyuuooo, but better described by a graph than text.
|
|
|
|
 |
|
 |
I get it from time to time mildly. Now thinking about it, my usual reason - lot's of loud clubs a decade or more ago - is probably not the true cause. I can remember standing in a wheat field when the wind died down, and all I could hear was my heart beating. On the other hand it does seem to come in moments of stress. Also once it's brought to my attention (like now) I'll notice it for a while too.
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
 |
|
 |
Another thought is: have you started taking any meds lately? You never know, it could be a side effect.
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
 |
|
 |
MidwestLimey wrote: Another thought is: have you started taking any meds lately? Yes, I have, SSRI's and SNRI's, and but the tinnitus goes back way before I ever took any meds. Not, however, as far as I know, necessarily before I ever took any drugs experimentally. It is noteworthy that tinnitus has been linked to serotogenic conditions and medications.
|
|
|
|
 |
|
 |
I've had it since 1968, got it from a close blast and have never recovered. The VA will compensate 10% if I can prove that it is military related. How in the hell would I do that. All I know is that over the years it has driven me crazy and after doing research have found there is no cure.
MIke
"It doesn't matter how big a ranch ya' own, or how many cows ya' brand, the size of your funeral is still gonna depend on the weather." -Harry Truman.
Semper Fi http://www.hq4thmarinescomm.com[ ^]My Site
|
|
|
|
 |
|
 |
Hi Mike;
Mine started as a result of a rifle report during basic training. Let me take a wild guess that yours, like mine, is in your left ear. I am guessing that because automatic rifles have a breach that ejects the shell casing to the right.
At the time, 1965, although we were issued them we weren't allowed to wear earplugs on the rifle range. The rational was that we wouldn't be wearing them in the field and we needed to get used to the sound of rifles going off close by. We were training with M14s (7.62mm) and they gave off quite a blast.
I did try to get it recognized as a service related injury but low and behold my audiograms prior to my hearing loss could not be located. Subsequently I couldn't prove that my hearing loss was service related.
|
|
|
|
 |