Answer Questions
james_cline_ UserNameToken and KerberosToken together
Hello all. In my webservice I want to mix windows and custom authntication. I can successfully use UserNameTokens or KerberosToken via applying corresponded policies to a webservice class. But I want to an ability to mix these 2 options and write something like this: if ( RequestSoapContext.Current.Credentials.UltimateReceiver.GetClientToken<KerberosToken>() != null ) { //do some win-based authorization actions } else if ( RequestSoapContext.Current.Credentials.UltimateReceiver.GetClientToken< UsernameToken >() != null ) { //do some forms-based authorization actions } The problem is that I cannot achieve this using one policy. Also I cannot apply 2 policies to one WebService class. Does ...Show All
rpmcontrols Save a pdf file with c#(windows forms) in sql server
I would like a sample of code to do this. Can anyone help me Well i want to pick a pdf file (using a windows form) and save it into sql server using c#, and then read that file from slq server and put it in a windows form As I understand it you are trying to generate PDF files from within your code. If that's true there are 2 possible options I know of: You can install a PDF printer driver: PDF995 CutePDF writer PrimoPDF ... You can use a open source PDF generator library : iTextSharp SharpPDF Report.NET PDFSharp PDF Clown It is important to know if your solution is going to be used to generate PDF files on server-side or client-side. I ...Show All
duancg .NET API to check whether a given directory is a subdirectory of another one
Assume you are given a directory name which can be "bin\debug", or "c:\bin\debug", or " \\machine\c$\bin\debug ", or " \\machine\bin\debug " if bin is a public share on the machine, you want to know if it's a subdirectory of a rooted directory "c:\foo", is there a standard .NET API help me do that I dont think you can for security reasons. if the directory "bin" is a public root folder, you are unable to see whats "behind" or what is the parent directory of that by natural Windows security. on the other hand if this is not the case (bin being a root folder for the public) you could probably get a list of files, then check the directories: ...Show All
GroZZleR XML scheme that causing crashing of the dataset
When i am converting a XML having the following elements in the body: <ROOT> ... <ITEMS> <ITEM attr1="value" attr2="value"/> <ITEM attr1="value2" attr2="value2"/> </ITEMS> ... </ROOT> to dataset an artificiant key is created for the table ITEMS which connects it to the table ITEM. However, when i continue working with the dataset it display an error than a constraint is missing. What is a correct way to handle such XML in the dataset in the condition i want to be able to work with tables in the type-safe manner (.NET 2.0) and see them in the design time Hi Minherz, Initially I think you should design your dataset visually. That means create the obj ...Show All
Kevjs use of name: "Object Library" vs. "Class Library"
This is a question that I have pondered, but never bothered to really look into it till now. What is the difference between calling library of classes a "Class Library" and an "Object Library" I've heard these two terms used synonymously, but now I'm at a point where I have to find out if there really is a difference. Yeah that would be an object model. A "class library" is generally a term used for an assembly which contains the classes (and enums, structs etc). An "object model" is the term used to describe how the classes relate to each other, and may involve classes from multiple class libraries. In a 'purest' sense you can only have a class library. The class is what defines what ...Show All
Redmanmc Bypass Proxy for local Gateway
Hello, I have a proxy server on my network which I direct all users to for web browsing and access management, the proxy is at a remote site which is accessed through a VPN. We also use a .net product supplied by an external company to access their network and data. The problem I have is that the .net program is using the proxy server at the remote site for its connection to the remote server. I need it to use the default gateway of the local machine so that when the VPN is down they still have access to the program using their local PC. I have found a KB article (318140) that shows how to configure .net to use an alternate proxy rather then the default given by IE, however, I don't have an alternate proxy only a gateway. Is ther ...Show All
Jessica Alba search words sequence in a string with regular expression
HI, I've got some strings that contain the following text: 1) "That film is very beautifull". 2) "How much beautifull is the film ". 3) "The film is boring". I need, if it is possible with RegEx, to search if the string contains "film" AND "beautifull". I've tried with the following pattern: "film.*beaut.*", but IsMatch method returns only 1) I'm not interested in the exact sequence of the words. Can I achieve this with regex I know that I could do "(film.*beaut.*)|(beaut.*film.*)" but the number of the words to search is variable, so i don't want to perform all the possible combinations of the words in the search pattern. Thanks in a ...Show All
Tryin2Bgood Running a Macro in a Password Protected Access Databse
I have this problem that I can run the macro but since the database is protected it always prompts me for the the password. I cannot have the users have access to the database since this will make it possible for the data to be changed manually. The code I use is as follows Shell( "C:\Program Files\Microsoft Office\Office\Msaccess.exe DatabasePath /x JobCardPacks /pwd Password" ) I have checked the help in access and it says to use "/pwd" with the password. This still prompts for the password though. Please help I would recommend using automation instead of Shell: How to open a password-protected database through Automation in Access 2000 How to run Office macros ...Show All
Swarna can we store a whole datarow while using sqlDataReader automatcally
Hi, Is there an automatic way to keep (store) a whole datarow somewhere in a variable rather than each field of a sqlDataReader so that I can use it after. Thanks a lot can t you use a datagrid to show the table!!! An if the table is filled with all the rows, how can I show the full table into a textbox for example Please tell me,i've made a dataset from a dataReader ok,i took data from one table in that dataset,but with same data reader,i want to make another dataset wgich has data from another table bcoz i've to iterate through specific columns of both tables so what should i do. being specific,i've a table Personal and a Table Patients and i want few fields data from b ...Show All
Marcos Ruano Multicasting UDP packets and IGMP generation
I've been trying to write a program that joins a multicast group but I've had limited success using the UdpClient method. I read somewhere there was a known issue with the IGMP packets on this. So, can someone point me to how to build my own IGMP packets I've been looking at the documentation and I'm at a bit of a loss. I'm pretty new to Windows programming but not programming in general. Any insight would be greatly appreciated. Thanks! George P.S. I've been developing in C#, if that makes any difference. ...Show All
Javier Martinez SFTP c#
I want to do SFTP using c#. how it can be done No, as SFTP is part of SSH family of protocols, and SSH is not implemented in .NET Framework. But why not use the third-party one You can compare them on comparison page Are there any SFTP libraries built into any of the .NET Framework versions You could try edtFTPnet/PRO, our C#/.NET client that supports FTP,FTPS and SFTP. See http://www.enterprisedt.com/products/edtftpnetpro/overview.html and http://www.enterprisedt.com/products/edtftpnetpro/download.html for a trial download. regards Bruce Blackshaw Enterprise Distributed Technologies You could also try Rebex SFTP ...Show All
satya999 Errors creating new data source
I've been writing OOP code for 10+ years, and am now excited to learn C#. To help me get going, I recently installed Visual Studio 2005 b2, and have been studying ADO.NET & working through some MS Access projects. I've followed several tutorials on the Data Source Config Wizard, searched MSDN and other online sources, but have come up dry trying to figure out why, whenever I click the Wizard's FINISH button, I get this error: "An error occurred while creating the new data source: Could not get type information for 'MyProject.MyProjectDataSet'." I can add the Access file to the Server Explorer, but can't drag a table to a form. It's behaving differently than the tutorials show, and I've spent three days now trying to determine why. ...Show All
gullu SqlConnection.Open Timeout Framework 2.0
Hello Everyone, I have a problem with SqlConnection class when i try to get a SQL Server 2000 connection, i'm using Ms Framework 2.0 and System.Data.SqlClient namespace, i also have a Windows 2003 Server and i need to use Integrated Security, there is something rare because i use the same code with Framework 1.1 and it works fine. SqlConnection conexion = new SqlConnection("Initial Catalog=MyBase; Data Source=MyServer; Integrated Security=SSPI"); conexion.Open(); On the client machine i have windows xp sp2 and i signed in. Should i install a service pack, update or something else Thanks for any help! Hi, I am facing a bit more peculiar problem. I am using SQL server 2000 serv ...Show All
SGriffiths Convert string to int
Is there anyway to convert a String to Int say if I have String width ="640"; I want it to assign to int dimension=width I don't want some conversion like String char="A" to integer which become 10. Just a straight conversion Is it possible A quicker way is: Convert.ToInt32(string value); Convert.ToInt16(string value); Convert.ToInt64(string value); Matt Sipes wrote: Don't make it so hard on the guy! Parsing Come on! lol string width = "640"; int dimension = Convert.ToInt32(width); Convert.ToInt32() just called int.Parse() anyway. :) int.parse("XXX") is a quick way Fridge_C wrote: ...Show All
jls How to REMOVE a publisher policy assembly from the GAC using gacutil?
I've created a publisher policy assembly for an assembly and have successfully installed it in the GAC using gacutil.exe. I need to remove that assembly from the GAC now (to verify that I can delay-sign a policy assembly for local testing since I don't have access to the full public-private key file at my current location.) Here's what I see: >gacutil -i Policy.1.0.TestBoundLibrary.dll Microsoft (R) .NET Global Assembly Cache Utility. Version 2.0.50727.42 Copyright (c) Microsoft Corporation. All rights reserved. Assembly successfully added to the cache However, unlike normal assemblies I am unable to remove it: >gacutil -u Policy.1.0.TestBoundLibrary.dll Microsoft (R) .NET Global Assembly Cache Utility. Version 2.0.507 ...Show All
