|
There's really no difference between running your code on a Server version of Windows and a Workstation version. Setting security options would depend nearly entirely on what your application is doing and what resources you want it to have access to and under what user accounts. This is by no means trivial, meaning setting an option here and there. There is a bunch of planning that goes into this because there are just so many considerations - code access security, users rights to resources, database security, ... There's just too much to go into in a forum post.
You can start with the .NET Developers Guide and the section on Code Access Security[^].
And no, you don't HAVE to make a strong name for anything, but depending on your application and requirements, it might just be a good idea.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hello Dave,
I copied the directory to the server and tried to run it. But I get a security exception. The given exceptions are:
An unhandled exception of type 'System.Security.SecurityException' occurred in fichebeheer.exe
Additional information: Request failed.
Unhandled Exception: System.Security.SecurityException: Request failed.
at fichebeheer.Form1.InitializeComponent()
at fichebeheer.Form1..ctor()
at fichebeheer.Form1.Main()
The granted set of the failing assembly was:
PermissionSet class="System.Security.PermissionSet"
version="1">
IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e"
version="1"
Read="USERNAME"/>
Doesn't this mean I need to set some permissions?
Greetz Kris
|
|
|
|
|
You'll probably have to relax Code Access Security for your app. Windows 2003 is locked down tighter, by default, than any other version of Windows out of the box.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dear Sir
I created New Package by wizard in SQL server 2000. I want to write store procedure to execute it but i don't know how to write it.
could you tell me how to write it?
|
|
|
|
|
|
|
|
My application is Open text file.
I have MenuStrip
File --> New
--> Open
--> Save
--> Save As
--> Exit
If I click new newform open
If I click open openform will with source text file
When I open newform and Openform
Question
HOw can i know that i focus which form?
................
|
|
|
|
|
Socheat.Net wrote: If I click new newform open
Socheat, open what?
Socheat.Net wrote: If I click open openform will with source text file
What do you mean by source text file?
|
|
|
|
|
I mean that sourece text(*.txt)
................
|
|
|
|
|
It seem that you didn't provide me enough information. Could you clarify and ask your question again? I don't know what you want to do right now.
|
|
|
|
|
OK
I have 3 forms
MainForm
OpenForm
NewForm
OpenForm have control called RichTextTob and NewForm has too.
If I open two forms I write some text in to NewForm, if I want to save it I don't know how to write the code they are two froms running in mdi parent.
................
|
|
|
|
|
Socheat.Net wrote: if I want to save it I don't know how to write the code they are two froms running in mdi parent.
If you have a problem with working with MDI form, please refer to my previous post.[^]
Socheat.Net wrote: If I open two forms I write some text in to NewForm, if I want to save it I don't know how to write the code
But if you have a problem to save to the text file, try to check this source code[^].
Is it help you?
|
|
|
|
|
The problem is not with save, it with form if active openform, it should go one way, if active newform it should go another way
................
|
|
|
|
|
|
|
Sir,
When i click on the particular row of the datagrig all the data of that row should display in the various textboxes.For that please send the code.
Thanks and Regards
Amaneet Brar
|
|
|
|
|
Create an event handler for the data grid. EIther Click or DoubleClick
Use this syntax to extract the data from the current row.
DataGrid.Item(Datagrid.CurrentRowIndex, ColumnNumber)
So if the First name is in Column 1 do
TextBox.Text = Ctype(DataGrid.Item(datagrid.CurrentRowIndex, 1), String)
Hope this helps
-- modified at 4:51 Friday 9th June, 2006
|
|
|
|
|
Sir,
Can we do addition , deletion , edition , updation of data in excel sheets programically as we do in access database by oledbconnection.If yes can you please send the code link?
Thanks and Regards
Amaneet Brar
|
|
|
|
|
Hello.
It may help if you know a bit of VBA for excel as the coding is very similar.
1. Create a reference to Excel Object library in the COM tab when you write click references.
2. Create the objects in code
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
3. Set the objects
xlApp = CType(CreateObject("Excel.Application"), Excel.Application)
xlBook = CType(xlApp.Workbooks.Open(xlfile), Excel.Workbook)
xlSheet = CType(xlBook.Worksheets(1), Excel.Worksheet)
xlFile is the path name of the file you want to open. If you want to create a new xlfile type
xlbook = Ctype(xlApp.Workbooks.Add, Excel.Workbook)
4. To set the Values of cells use
xlsheet.Cells(Rowindex, ColIndex).Value = "abc"
Have a look in the help section of the "Visual Basic Editor" in excel to see how to change values and move around the sheet etc.
Hope this helps
-- modified at 2:41 Friday 9th June, 2006
|
|
|
|
|
Sir,
can you please send any link or the detailed code for adding , deleting , updating the records in the excel sheets?
Thanks and Regards
Amaneet Brar
|
|
|
|
|
When you say adding, deleting and updating, do you mean changing the values in particular cells and worksheets?
Do you need to update formulas, delete entire rows or columns or applying formats to the cells. If you can give me a list of the functions you want to do I can tell you the specific code for them.
|
|
|
|
|
Sir,
I want the complete code for that what you mentioned.
If possible please send the code.
Thanks and regards
Amaneet Brar
|
|
|
|
|
Are you happy with what I said above for creating the reference and setting the objects to create the Excel spreadsheet?
|
|
|
|
|