|
Ok, it seems to be an issue with .NET 2.0 indeed.
I've converted the VS 2003 test solution to VS 2005 and tried again. I could reproduce the failure to check the StringNameIdentityPermissionAttribute with .NET 2.0 - the very same application that threw a SecurityException with 1.1 ran without problems in 2.0!
I think it's time to contact MS...
Regards,
mav
--
Black holes are the places where god divided by 0...
-- modified at 12:57 Tuesday 28th February, 2006
I just found some additional information that might be of interest:
In the microsoft.public.dotnet.security newsgroup I found a statement that in .NET 2.0 fully trusted code will automatically bypass all identity permission demands.
Heaven knows why this decision has been made, but this seems to explain the behaviour.
-- modified at 13:12 Tuesday 28th February, 2006
And another piece of wisdom from Eugene Bobukh:
http://blogs.msdn.com/eugene_bobukh/archive/2005/05/06/415217.aspx[^]
|
|
|
|
|
I'm writing some C++ code that I'd like to prepare for simple interop. To make things as easy as possible on the .NET side of things, how should I declare a C++ function that:
1. takes an array as a parameter? Is int* ok?
2. returns a UTF8 string. Is LPSTR ok? Should I use an output parameter instead of a return value?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Connor's Christmas Spectacular!
Judah Himango
|
|
|
|
|
How do you intend to interop it, managed C++ or COM ? If managed C++, you'll end up writing methods that take .NET types anyhow.
I guess there is also pinvoke.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yeah I was planning PInvoke simply because there is an existing codebase (I'm trying to port some Java JNI code into the .NET world). I considered using C++/CLI to make it simpler, and may end up going that way, but for now I've just declared the methods as described in my first post.
So any thoughts on how to define a C method that takes an int[] and returns a string so that it can be used easily from a .NET language?
|
|
|
|
|
Judah Himango wrote: 1. takes an array as a parameter? Is int* ok?
Yes.
Judah Himango wrote: 2. returns a UTF8 string. Is LPSTR ok? Should I use an output parameter instead of a return value?
It is ok, as long as the calling application doesn't have to free or delete the memory.
I don't see dead pixels anymore...
Yes, even I am blogging now!
|
|
|
|
|
Thanks Daniel. The calling app would have to free the memory, so I think what I'll do instead is have the method take a 2nd LPSTR parameter which will be the output. That way I can feed in a StringBuilder and have it work without issue.
|
|
|
|
|
Will an event be raised when all the controls in a form has been drawn?
I have a form with many buttons with BGpics in it. Can I set the form to invisible, let it load all the pic, and then show it instead of it showing it and loading the pic at the same time (this makes it look really laggy)
|
|
|
|
|
If a control is not visible, and its background image is changed, will the image actually change? or will it only change only when it becomes visible?
|
|
|
|
|
That depends on how you specify "the image".
If the control is not visible, there is no background image drawn. If you change the property for the background image, the property changes, but as the property is not used as an image, the image can't change.
---
b { font-weight: normal; }
|
|
|
|
|
If a tree falls in the woods, and no-one is there to hear it...
If the control is not rendered, then no image is drawn.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yes it will. But you won't see the change until you make the control visible.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
That means that if I have a number of pictures changed but not visible, it has potential to slow down the foreground performance right?
|
|
|
|
|
Yes, your app will take a performance hit every time you change (i.e. read) a new image (assuming you're reading them from a file).
A simple work-around would be to only remember the new image name everytime you "change" it. Then, when the control shows itself, it should load the current image (if it hasn't already done so) and set it as its background.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
How would I go about creating my own file format for an application?
Any help is appreciated
Wacky waving inflateable arm flailing tube man!
- Family Guy
|
|
|
|
|
Come up with three letters that are not commonly used ( not .doc for example ), then write the code to store relevant data to a file, and read it again.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sean89 wrote: How would I go about creating my own file format for an application?
Like Christian said, pick an uncommon extension, and use any file reading and writing mechanisms you want. For maximum efficiency, pick a file type that has lots of existing library support (like Xml or MDB), and use that file type with an uncommon extension.
Your files look like "ABC" files in explorer, but your app knows that they're really XML or Access database files when it goes to read and write them.
Share and enjoy.
Sean
|
|
|
|
|
Hi
I'm use using HttpWebRequest and HttpWebResponse to get a big xml file (about 10mb) from the web.
Now I want to parse this file and store it to the hard drive at the same time.
Problem:
When I store it first, then load it via TextReader it takes to long.
When I parse it directly via XmlTextReader, I can't save it to the hard drive any more.
Any idea, how to manage this problem? Properbly by filling an memoryStream?
Thanks
Paul
|
|
|
|
|
use the XmlTextReader, and as you parse the file, use a XmlTextWriter to save it on disk.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
i want to run my program in background.it functions like that when it found a new file HTML or PDF on harddrive.it is activated and default screen of my programs become visible to user.if any one have any idea of doing so then plz help!!!Thank you
|
|
|
|
|
Hi
i had a problem with connecting to my Data Base on the server but after giving my user the permissions it works.
Now i have a problem, when i doing an SQL Query on the table(select * from Users) i get the answer with the Query Analyzer.
when i am writing it in the source code with C# i get this error message:
"SELECT permission denied on object 'Users', database 'RTQ', owner 'dbo'. "
the exeption comes from this function:
myDataAdapter.Fill(myDataSet,"Users");
the hole code is :
mycon = new SqlConnection("Data Source=localhost;Database=RTQ;Integrated Security=SSPI");
mycon.Open();
myDataAdapter = new SqlDataAdapter("select * from Users",mycon);
myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet,"Users");
mycon.Close();
Why is that????
Thanks you all
|
|
|
|
|
Does the user have SELECT permissions?
|
|
|
|
|
How do i konw this?
i gave him the login permissions, i thought that all the permissions come with that.
Do i have to give pemissions for each SQL command??
where do i do this?
|
|
|
|
|
Te easiest way is to make the user database owner. That includes permission to do anything.
---
b { font-weight: normal; }
|
|
|
|
|
That's an easy solution, but lets not open a security hole too wide.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
You are right of course. On a distributed application the premissions should ideally be minimal, for an example only permission to execute stored procedures.
In a development environment (as I got the impression we are dealing with here) security is normally less of an issue, and granting database owner access can be an acceptable way to make it work and save permission hassles for a later stage.
---
b { font-weight: normal; }
|
|
|
|