[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

CryptographicException from System.Security.Cryptography.Protected

ondrej421

4/22/2008 11:58:00 PM

Hi there,

On some computers running Windows XP, the ProtectData() method sometimes
throws the following CryptographicException:

Type: System.Security.Cryptography.CryptographicException
Message: The system cannot find the file specified.

Source: System.Security
Stack Trace:
at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData,
Byte[] optionalEntropy, DataProtectionScope scope)
...

This is how the method is being called:
byte[] encrypted = ProtectedData.Protect(plain, null,
DataProtectionScope.CurrentUser);

I can't find an answer to why this would be happening. Can anyone think of a
possible reason?

Thank you!
11 Answers

Jeroen Mostert

4/23/2008 12:18:00 AM

0

ondrej421 wrote:
> On some computers running Windows XP, the ProtectData() method sometimes
> throws the following CryptographicException:
>
> Type: System.Security.Cryptography.CryptographicException
> Message: The system cannot find the file specified.
>
> Source: System.Security
> Stack Trace:
> at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData,
> Byte[] optionalEntropy, DataProtectionScope scope)
> ...
>
> This is how the method is being called:
> byte[] encrypted = ProtectedData.Protect(plain, null,
> DataProtectionScope.CurrentUser);
>
> I can't find an answer to why this would be happening. Can anyone think of a
> possible reason?
>
> Thank you!

..Protect() is a thin wrapper around the native CryptProtectData() function,
so it's safe to say this has nothing to do with the .NET framework itself.
CryptProtectData() doesn't document a special failure mode.

Assuming the "file not found" is genuine (and not a bogus error value
produced as a result of a bug) try installing Filemon
(http://technet.microsoft.com/en-us/sysinternals/bb8...) to see if
there are any obvious API calls failing when you use ProtectedData().

--
J.
http://symbolsprose.bl...

TareeDawg

7/31/2010 10:26:00 PM

0

M forever wrote:
> On Jul 31, 9:13 am, Bob Lombard<thorsteinnos...@vermontel.net> wrote:
>> On 7/31/2010 2:22 AM, Bob Harper wrote:
>>
>>> On 7/30/10 10:18 PM, mark wrote:
>>> (snip)
>>
>>>> Let me know when you have the definitive answer to how many angels may
>>>> dance on the head of a pin.
>>
>>> As angels are pure spirits, the answer is obvious: an infinite number.
>>> If that's a representative sample of an atheist 'speaking truth to
>>> religion', I'm decidedly unimpressed. I'm frankly surprised you were
>>> taken in by that old chestnut.
>>
>>> Bob Harper
>>
>> Angels are subject to Binary Law. The answer to the question is: 1023.
>
> Why not 1024?

One must include the 0 in Bob's mathematical world, who also gives the
answer in decimal.

Ray Hall, Taree

Bob Lombard

7/31/2010 10:46:00 PM

0

On 7/31/2010 6:25 PM, Ray Hall wrote:
> M forever wrote:
>> On Jul 31, 9:13 am, Bob Lombard<thorsteinnos...@vermontel.net> wrote:
>>> On 7/31/2010 2:22 AM, Bob Harper wrote:
>>>
>>>> On 7/30/10 10:18 PM, mark wrote:
>>>> (snip)
>>>
>>>>> Let me know when you have the definitive answer to how many angels may
>>>>> dance on the head of a pin.
>>>
>>>> As angels are pure spirits, the answer is obvious: an infinite number.
>>>> If that's a representative sample of an atheist 'speaking truth to
>>>> religion', I'm decidedly unimpressed. I'm frankly surprised you were
>>>> taken in by that old chestnut.
>>>
>>>> Bob Harper
>>>
>>> Angels are subject to Binary Law. The answer to the question is: 1023.
>>
>> Why not 1024?
>
> One must include the 0 in Bob's mathematical world, who also gives the
> answer in decimal.
>
> Ray Hall, Taree

I got that bit of whimsy (not the angels part) from the Clarke/Pohl
story "The Last Theorem". The protagonist is fond of demonstrating how
to count that high on his fingers.

bl

--
Music, books, a few movies
LombardMusic
http://www.amazon.com/shops/A3NR...

O

7/31/2010 11:41:00 PM

0

In article
<3c596c02-d922-4cd2-b683-8c2f11d4c5dc@w12g2000yqj.googlegroups.com>, M
forever <ms1000@gmail.com> wrote:

> On Jul 30, 10:16?pm, O <ow...@denofinequityx.com> wrote:
> > In article
> > <6fa38694-18f7-45b9-b81c-59fca4c20...@i28g2000yqa.googlegroups.com>,
> >
> > mark <markstenr...@yahoo.com> wrote:
> > > On Jul 29, 6:42?pm, O <ow...@denofinequityx.com> wrote:
> >
> > > > > Religions don't pretend to supply all the answers. ?Even science
> > > > > doesn't promise that.
> >
> > > The problem is that religions look askance at anybody and anything who/
> > > that supplies answers that conflict with their dogmas.
> >
> > Yes. ?But that's why they're religions. ?There probably are some
> > religions which are so open ended that they accept any and all beliefs,
> > but most have a written agenda that they preach. ?But nobody makes you
> > sign up, at least not in this country.
>
> Nonsense. The social pressure to "sign up", in some parts of this
> country, is overwhelming. As is the need for public figures to protest
> their religiousness in order to prove how "good" and "moral" they are.

I repeat. Nobody makes you sign up. If you make your life decisions
on "social pressure," then you're not very sincere about it anyway.
>
> > > Science doesn't promise to have all the answers, but science does
> > > promise to conduct an open and objective search for the answers, and
> > > lets the chips fall where they may in the process.
> >
> > > Religions can't afford to do that, for therein lie the seeds of their
> > > destruction.
> >
> > You wouldn't want a religion to do science anyway. ?The way I look at
> > it, religions are what they are. ? If you agree, sign up. ?If you
> > don't, start you own or go someplace else.
>
> Fortunately, we are getting close to a situation where you can
> actually do that. Not too long ago, no matter where you lived,
> religion meddled into the worldy affairs of everyone all the time.
> They still do in this country to a much higher degree than in Western
> Europe, if less than in many other parts of the world where you still
> don't have freedom *from* religion.

Try publishing some Muslim related cartoons in Denmark, or any other
Western Europe country.

-Owen

O

8/1/2010 2:02:00 AM

0

In article
<1f297bd1-ff81-428d-9bac-8997f86cce3b@v6g2000prd.googlegroups.com>,
mark <markstenroos@yahoo.com> wrote:

> On Jul 31, 4:40?pm, O <ow...@denofinequityx.com> wrote:
>
> >
> > > Nonsense. The social pressure to "sign up", in some parts of this
> > > country, is overwhelming. As is the need for public figures to protest
> > > their religiousness in order to prove how "good" and "moral" they are.
> >
> > I repeat. ?Nobody makes you sign up. ?If you make your life decisions
> > on "social pressure," then you're not very sincere about it anyway.
>
> Looks like the vast majority of human beings aren't very sincere.
> Social pressure is a very real and a very powerful pressure, perhaps
> THE most-powerful pressure out there.
>
> As far as who signs one up for religion - it's your parents. Your
> parents make that decision for you before you even know that you're
> going to spend your Sundays eating the flesh and blood of some long-
> deceased Hebrew zombie.
>
> Are you really of the opinion that there is no social pressure
> attached to going against a decision your parents made for you? An
> action that carries with it the good chance that you will be
> ostracized by those closest to you should you forsake that decision?

Why, I've done just that. Went to Catholic School for 8 years with
nuns and even Father Porter (though I didn't have any contact with
him.) I've only been to Church for my son's wedding last May. It's
not all that hard.

There is NO social pressure on people to join religion today. Parental
pressure, maybe, but one can only observe all the lapsed Catholics and
see how easy it is.

> And how easy is it for humans to treat as fiction the threat of
> eternal damnation should they forsake their religion - a threat that
> you have been told is very real since before you stopped crapping your
> diapers?

"All Right! I'll go to hell!" to bring another thread into this one.

-Owen

Gerard

8/1/2010 4:51:00 PM

0

mark wrote:
> On Aug 1, 5:07 am, Roland van Gaalen <SeeSignat...@DeadSpam.com>
> wrote:
>
> > As a non-believer, I do like the certain myths (including many
> > biblical stories), primarily for their simple grandeur and the
> > strong sentiments they express, apart from their cultural
> > importance.
>
> Agreed. Nothing wrong with those sentiments when one is listening to
> music.

What's the connection with music, and what is wrong when _not_ listening to
music?


O

8/1/2010 4:52:00 PM

0

In article
<ee48ddf5-82e5-4b46-99fa-9dff191347e0@t5g2000prd.googlegroups.com>,
mark <markstenroos@yahoo.com> wrote:

> On Aug 1, 5:07?am, Roland van Gaalen <SeeSignat...@DeadSpam.com>
> wrote:
>
> > As a non-believer, I do like the certain myths (including many biblical
> > stories), primarily for their simple grandeur and the strong sentiments they
> > express, apart from their cultural importance.
>
> Agreed. Nothing wrong with those sentiments when one is listening to
> music. The problem arises when those sentiments are foisted on others
> and become government oplicies.
>
> >
> > I also like Bach's organ music (much more than his choral pieces, I concede)
> > as well as powerful hymns such as "A Mighty Fortress" by Martin Luther and
> > "O God Our Help in Ages Past" by William Croft.
>
> As do I.
>
> >
> > As far as I am concerned, however, the associated religious beliefs and
> > dogmas should not be allowed a foot in the door, being utter nonsense if not
> > fraudulent.
>
> I used to listen to a lot more sacred music when I was a believer. I
> still listen to the great sacred works - B-minor Mass, Xmas Oratorio,
> messiah, Bach Passions, The Creation, various Requiems, etc - but the
> experience is different than it was when I believed in god. There's an
> element that is missing from my past listening.
>
> This had led to my culling my CD collection. I no longer have 20
> different recordings of Messiah. I now have maybe 5 recordings. Also,
> I used to listen to Bach Cantatas quite frequently. At this point, I
> can't remember the last time I put one on. But there they sit in all
> their complete glory (Teldec Bach 2000 Edition), not to mention in
> selections from other sources (Karl Richter box set on Archiv).
>
> I wonder if other atheists who have given up their faith have had a
> similar experience.
>

At the Newport Folk Festival, the Steep Canyon Rangers, fronted by the
comic Steve Martin on banjo, played the tune "Atheists ain't got no
songs."

-Owen

Frank Berger

8/9/2010 1:35:00 AM

0

mark wrote:
> On Aug 8, 2:58 pm, Roger Kulp <thorenstd...@yahoo.com> wrote:
>
>> "Age of Ignorance" has also been used to aptly describe Kim
>> Stagliano,David Kirby,and their merry band of antivaccine
>> loonies.Like religious fundamentalists,they not only cling to their
>> beliefs,but become more zealous when science proves them wrong.Like
>> religious fundamentalists,they are strongly antiscience,and base
>> their beliefs on their own brand of faith.Anybody who speaks
>> contrary is an evil heretic who wants children to suffer,or die.
>
> Yes. They have a lot in common with the conspiracy crowd - challenge
> their theories, and you've just revealed that you are part of the
> conspiracy!

An original thought by me (not to say its new, just to me):

You can find all the times conservatives looked dumb in rejectiing
progessivity (no shortage there). Now we have to balance that against the
times that conservatism prevented or delayed a really dumb "progressive"
idea. Must have happened a time or two. You also need to count the dumb
progressive ideas that were adopted (ethanol). Or you can just cherry pick
if it suits you.


graham

8/9/2010 3:47:00 AM

0


"mark" <markstenroos@yahoo.com> wrote in message
news:96963864-86cc-47df-b457-7f12ab27f145@f6g2000pro.googlegroups.com...
On Aug 8, 2:58 pm, Roger Kulp <thorenstd...@yahoo.com> wrote:

> "Age of Ignorance" has also been used to aptly describe Kim
> Stagliano,David Kirby,and their merry band of antivaccine loonies.Like
> religious fundamentalists,they not only cling to their beliefs,but
> become more zealous when science proves them wrong.Like religious
> fundamentalists,they are strongly antiscience,and base their beliefs
> on their own brand of faith.Anybody who speaks contrary is an evil
> heretic who wants children to suffer,or die.

Yes. They have a lot in common with the conspiracy crowd - challenge
their theories, and you've just revealed that you are part of the
conspiracy!
----------------------------------------------------------
I don't believe in conspiracy theories! Of course, they'd want you to think
that way!
Graham


O

8/9/2010 4:12:00 AM

0

In article
<246d02da-a4f1-46e8-b36b-32064ad8a304@d17g2000yqb.googlegroups.com>, M
forever <ms1000@gmail.com> wrote:

>
> I am sure you are right.
>
> So give us a few examples for "dumb progressive ideas" which were
> heroically prevented by "conservatism".


Here's one (of many):

But it wasn't prevented by "conservatism," but remedied by it.

The luxury tax. A wonderful progressive idea: tax the rich through
their expenditures - yachts, jewelry, expensive cars.

As a result of this very large tax, the rich stopped buying luxury
items. They saved their money instead, and got richer.

It put every major boatbuilder in the Northeast (maybe the whole
country) out of business. If you've ever been to a boatbuilder's,
you'll notice it's mostly blue collar workers, specialized carpentry
skills, not a lot of millionaires working there.

It put the lights out on lots of boatbuilders that produced excellent
boats that are still being sailed today: O'Day Yachts, Pearson Yachts.


So What happened then? There was no significant revenue gain, in fact
a net loss because all the luxury industries were hurting and closing
down and payrolls now didn't get taxed. Congress realized they screwed
the pooch, and repealed it quick. But too late. All those boat
builders out of business, never to return.

To try to mitigate the damage, Rhode Island repealed all their taxes on
boats. The industry was just starting to come back when the recent
depression hit again, and they're lashing themselves to the mainmast.

-Owen