Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

DotNetDominator

@DotNetDominator
About
Posts
30
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • CHtmlView - zoom in/out on Ctrl + mouse scroll
    D DotNetDominator

    use OLECMDID_OPTICAL_ZOOM. define it as 63 if you get compile error. CComVariant vZoom((int)dZoomFactor); m_HTMLCtrl.ExecWB((OLECMDID)OLECMDID_OPTICAL_ZOOM, OLECMDEXECOPT_DODEFAULT, &vZoom, NULL);

    C / C++ / MFC tutorial question

  • Binary or Non-Binary File
    D DotNetDominator

    Of course, all files are Binary, but i want to differentiate files based on the printable characters they contain. Basically, i need it for a utility which would compare two files and write the differences between them to third file, or may update one file by comparing it to the others. I can only tell this much. Since, such comparision for "binary" files like DLL, Jar etc are meaningless i wanted to identify them before i compare them. I can't change the utility i will use for such comparision. I wrote following method, which i think would work fine. Do you think it would work across all character sets? I am just reading file byte by byte and looking for a byte which is zero. Then i know that the file is binary. static bool isBinary(ref BinaryReader binaryReader) { bool nullByteFound = false; int i = 0; byte unsignedByte; while (i < binaryReader.BaseStream.Length) { unsignedByte = binaryReader.ReadByte(); if (unsignedByte == 0){ nullByteFound = true; break; } i++; } Console.WriteLine("Bull= " + nullByteFound); return nullByteFound; } The other API IsTextUnicode may also help in solving problem if i retrieve IS_TEXT_UNICODE_NULL_BYTES flag. Thanks all for your help on this.

    C# csharp c++ help question

  • Binary or Non-Binary File
    D DotNetDominator

    Is there a way in C# or C++ to determine if given file is Binary or Non-Binary. There are some forums which suggests to check the bytes of file and look for null byte. Is there any other way around? Any help would be appriciated.

    C# csharp c++ help question

  • FileIOPermission Assert
    D DotNetDominator

    Hi, I am sorry. I have not set up ACLs on Directory before. Can you tell me how do you do that? Do you use NTFS directory security to use ACLs? What I do: I know how to use .net Framework configuration to control the access to the system resources. So,I would create another Code Group at the Enterprise Level and Configure it's Membership Condition to make it for the directory where your code is. Then I would just give the Execution permission and some File IO permission. I would suggest not to use assert. A Stack walk is initiated every time when your code initiated "Demand", Which would check the permissions to all the Callers in the call stack. This is to prevent the Elevation of priviledge. When you use Assert in your code it will Vouch for all the code that call your method. That means the stack walk will be terminated with positive result to the method who requested the Demand for Permission. Hence, any method who calls the method that has Assert statement in it will not be checked by CLR for appropriate permission. I am not an Expert. I am just a recent Graduate looking for a job. But, do write in case of further help. Thank you.

    ASP.NET asp-net help question lounge learning

  • Create ObjectDataSource from passed in DataSet
    D DotNetDominator

    hi, Once you create a DataSet.Xsd, You need to add a Table Adapter. Just Drag and Drop from Tool Box if they do not add automatically for you. Follow the steps and It will also generate Methods for Update and Delete the record for you. Now, You just have to go to Design mode of your .Aspx page and configure the ObjectDataSource control to select methods to select, Update and Delete records. Just Give it a try. I am not sure if this is what you need. Can you not use GridView instead of DataGrid?? Thanks.

    ASP.NET csharp css asp-net help

  • Master Page + style sheet
    D DotNetDominator

    Hi, Of course you can use Style Sheet. For asp.net 2.0 Use Theme Instead. Add following tag in your web.config. Go TO Solution Explorer. Right Click and Select "Add ASP.NET Folder". Select to Add Theme Folder. Add Style sheet to Theme Folder. Rename Theme FOlder to "DefaultTheme" Folder. You can give any name here. You are not require to Link Style Sheet to All Pages as It was in ASP.NET 1.1 Write in Case of Further Help.

    ASP.NET help question

  • FileIOPermission Assert
    D DotNetDominator

    Hi, I understand that you want to write an Error Log to a File and in order to do that You want to give user a Permission to achieve that. Then What you are looking for is a Code Access Security, which gives permission to Code also that is running instead of only basing security decision on Identity of User. By writing permission as shown below, You are giving permission to only those folder that has your log file. private void WritetoLog(string filename) { //assign Permission to this function to delete Only those files under specified filepath. string filestorepath = ConfigurationManager.AppSettings["FileStorePath"].ToString(); FileIOPermission f = new FileIOPermission(PermissionState.None); f.AddPathList(FileIOPermissionAccess.AllAccess, filestorepath); f.PermitOnly(); //Perform Write to Log here. } Write in case of further help. Thank you.

    ASP.NET asp-net help question lounge learning

  • Create ObjectDataSource from passed in DataSet
    D DotNetDominator

    Hi, I would suggest you to use Dataset.xsd, Instead of Creating your own. You just have to Add a DataSet by "Add New Item..." From Solution Explorer. After that Just Configure the query or Select the Stored procedure to use for Dataset. But if you want to use ObjectDataSource with your own SelectMethod then You need to Change the TypeName Property to the name of the class that contains the Method Specified in SelectMethod. Write in case of further Help. Thank you.

    ASP.NET csharp css asp-net help

  • code for login page
    D DotNetDominator

    Hi, If you are using asp.net 2.0 then just look for Login Controls and Membership. Most of the work is done with out a single line of code unless you want to customize them. write in case of further help. thank you.

    ASP.NET csharp asp-net database

  • Session State Timeout
    D DotNetDominator

    If you are Using Forms Authentication then in You can use it like..

    ASP.NET question testing beta-testing

  • File Upload
    D DotNetDominator

    Hi, Is there Any way to Update(Overwrite)/Delete previously Uploaded File. I am Using, Control. Even If there is any way to achieve this with out using fileUpload Control, Please Suggest that. Can I restrict user to perticular directory and not allowing him to look out side of that Directory?? Please Help!!:confused: Thank you

    ASP.NET help question announcement

  • datetime Comparision
    D DotNetDominator

    Hi, My Problem is solved. Credit goes to you. I was not really looking in to Day when i compared my value with start and end date. There was some error in my Logic. I am really sorry for giving unnecessary trouble. I am really surprised, How can i make such foolish thing.. Thank you very for your help.

    Database database help question

  • datetime Comparision
    D DotNetDominator

    Thanks for Quick Reply. My Query is Long and involves join of two table. But, I found this perticular area where problem lies. I do not understand why it is not comparing with time. I want it to compare with date as well as time. From Some of the Web site I found that I can compare Binary Values datetime field. But, when i do so, I am getting Arithmatic Overflow error. The link below has information for converting into binary. But, I does not work for me. http://www.sql-server-performance.com/fk\_datetime.asp making even AM to PM or visa versa also does not work. SELECT * FROM dbo.LoadTestscheduler WHERE '2006/05/07 1:10:00 PM' > dbo.LoadTestscheduler.StartDateTime AND '2006/05/07 1:10:00 PM' < dbo.LoadTestscheduler.KillDateTime Can you tell me How can i convert my date to a perticular format?? Do I have to use CONVERT With/Without or In addition to CAST?? Thank you.

    Database database help question

  • datetime Comparision
    D DotNetDominator

    Hi, Thanks for the Reply. I have tried everyway. But Still have not been successfull. SELECT * FROM dbo.Table WHERE (((CAST('5/7/2006 1:10:00 AM' AS DATETIME)) > dbo.LoadTestscheduler.StartDateTime AND (CAST('5/7/2006 1:10:00 AM' AS DATETIME)) < dbo.LoadTestscheduler.KillDateTime)) Result:- 0 0 2006-05-07 01:03:00.000 2006-05-09 01:04:00.000

    Database database help question

  • Deleting from an SQL database
    D DotNetDominator

    Hi, replace your String Query to one given here. string query = "DELETE FROM tblUsers WHERE User_name = '" + txtDelete.Text + "'"; I this should work now. Also, Just check your connection is open before you assign it to myCommand. Thank you.

    Database database csharp help announcement

  • datetime Comparision
    D DotNetDominator

    Hello, I have some problem with my Simple query. I just want to compare the DateTime value to a given range. Here i am giving my query and result. In Result, I do not understand why is selects 2 and 3 numbered rows. Any Other way to Compare datetime value to Date And Time of the field of a table?? SELECT * FROM dbo.Table WHERE ((CAST('5/6/2006 5:08:00 AM' AS DATETIME) BETWEEN StartDateTime AND EndDateTime) OR CAST('5/6/2006 5:08:59 AM' AS DATETIME) BETWEEN StartDateTime AND EndDateTime) RESULT :- 1 2006-05-06 05:04:00.000 2006-05-08 05:05:00.000 2 2006-05-06 05:07:00.000 2006-05-08 05:08:00.000 3 2006-05-06 05:07:00.000 2006-05-08 05:08:00.000 Thank you

    Database database help question

  • .Net 2.0 Security
    D DotNetDominator

    Hi, Sorry for late reply. I found that there is a class called DirectorySecurity. I think this is what you need. http://msdn2.microsoft.com/en-US/library/system.security.accesscontrol.directorysecurity.aspx You might know this, But this is just to remind that Demand() method just to perform Stack walk. That is used just to prevent the Elevation of Priviledge. When your method call some function in some other dll. So, That DLL may check your DLL by creating a instance of requested permission and compare it agaist all the methods in the call stack. According to MSDN, If the Parent Directory is Readonly then when you try to create a directory in that it will give an exception. Here are the more cases when Exception is thrown. Just check if your directory is readonly?? I've played a lot with policy files, Because I am studying .NET security course at my school. And I suggest you can do the same if you want. But, Instead you can create a new permission file under user group and do not assign any permission to it except execution. Now you can create a code group and assign this permission only as a permission set. You also need to select two checkboxes from General tab. This will prevent any access to be given to the All_Code when this condition is met. Otherwise, Permission will be granted based on Union of all code groups at each policy level + intersection of all policy level.

    .NET (Core and Framework) csharp security help

  • .Net 2.0 Security
    D DotNetDominator

    Hi, Dotnet Security is huge topic. I can just point you to the resource as such. Here is a good article. http://www.codeproject.com/dotnet/UB\_CAS\_NET.asp Permissions are based not only On Identity of User but also based on identity of code. So, If you want to give your code some permission You must assign certain Evidence to it which will be used to calculate Permission grantset during Policy Resolution. After all this Final Hurdle still remains. You OS should allow to write into that perticular directory. Just try to make a custom permission which will allow you to write in directory and assign it to code. For that you need to run Mscorcfg.msc from VS Command prompt or run it from .net Framework 2.0 configuration from Administrative tools.

    .NET (Core and Framework) csharp security help

  • string of GUID as Select Parameter in objectdatasource
    D DotNetDominator

    Hi, Thanks for the answer. I found one alternate way to do it as someone suggested me from Asp.net forum. But, Your reply made me think about the simple mistake i was making. I had provided Comma between values but I did not provide quotes between value. Hence, each guid was compared to entire string i suppose. I'll try to put 'guid','guid' format as well. Thanks

    Database database question

  • ObjectDataSource Parameter. Please Help.
    D DotNetDominator

    Hi, Mr.Mackay, I Do appreciate the help provided by people by taking time for it from their busy schedule. But, I did mean to blaim any one for not getting reply. It's just that I was desperate to have answer because I've to finish this project in 10 days. I'll surely consider your suggestion of joining Microsoft support for urgent answer. But, As long as I am a student, I can not afford it. I joined this forum because, I found it very authentic and rich with knowledge. Anyway...I'll take care in selection of forum before i post. Thank you. Hi minhpc_bk, I am very very thankful for the reply.. Just what i wanted... It is running fine now... earlier i was thinking to pass parameter as http://vyaskn.tripod.com/passing\_arrays\_to\_stored\_procedures.htm but it requires stored procedure.. Thank you very much for solution.

    ASP.NET database question help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups