-
- Create an XML schema provided the XML file
by Vidya Sandela
- 1 Replies
- Last post
by Martin Honnen
- I have an XML file and I want to create the XML schema from the XML file.
.NET Framework has this feature in the tools when an XML is loaded, on the toolbox in the XML selection you have an option to choose Create schema. Is there any way I can achieve this with my program. Please let me know.
Thanks,
Vidya Sandela.
-
- UserImpersonation still retrieves system values
by Don354191
- 10 Replies
- Last post
by Suisse
- I have a system level account windows service which impersonates the current logged user and changes the keyboard settings of the user. Even though the impersonation works operations on the keyboard return system level settings.
Code Snippet WindowsIdentity newId = new WindowsIdentity(dupeTokenHandle); _impersonationContext = newId.Impersonate(); int count = GetKeyboard
-
- TCP\IP Network Programming
by Jeremy6996
- 3 Replies
- Last post
by Jeremy6996
- [VB.NET] Can anyone here lead me to an extreamly basic, or quite strait forward TCP\IP network programming tutorial.
-
- Uri Bug??
by Gu Xu
- 9 Replies
- Last post
by Mike Danes
- Some URLs cannot be processed correctly by the Uri class. The double slash "//" will be considered as a typo and replaced by "/". However, I may really need the double slash sometime, e.g. http://hostname/proxy/http://www.microsoft.com . In this case, the stupid "feature" will prevent me from using HttpWebRequest, which is based on Uri, to fetch web pages.
Is there any solution
-
- Credentials! driving me crazy
by HдL&#923
- 5 Replies
- Last post
by johnko
- Hello,
i have a web service.. i connect to it using a windows application... In my webservice class at client side there is the Credentials Method in the proxy class which is a part of the Parent class "HttpClient" I think. Now I can do somethins like that:
---------
WebService.Credentials = new NetworkCredential ( "userName" , "pwd" );
WebService.SomeMe
-
- specified cast is not valid
by LPlate
- 6 Replies
- Last post
by BonnieB
- im developing a web service that interacts with sql server express. When i test out 1 service, this error pops up. below is my code in the web service. (note. Alarm and SMS are bot in INT but i have to cast them into String to insert into array).
string[] aryAlert = new string[3]; dc.ConnectToDB(); command = new SqlCommand("SELECT SMS, Email, isDefault, UID, Alarm FROM Alert where (UID =" + uid
-
- InvalidOperationException was unhandled - Trying to Delete from Dataset.
by DBurr
- 2 Replies
- Last post
by DBurr
- Private Sub Delete_GRN_details()
Dim grnDda As New _
Stock_SystemDataSetTableAdapters.GRN_DetailTableAdapter()
Dim grnDtable As New _
Stock_SystemDataSet.GRN_DetailDataTable()
grnDda.Fill(grnDtable)
For Each drow As Stock_SystemDataSet.GRN_DetailRow _
In grnDtable.Rows
If drow.G
-
- How to get an .xsd from a resouce file
by Trophus
- 3 Replies
- Last post
by Sergey Dubinets - MSFT
- Hello All:
I have a .xsd file that I call from a DataSet using ReadXmlSchema. I
would like to add the schema file to to a resource and call like so:
MyDataSet.ReadXmlSchema(MyApp.Properties.Resouce.MyScema) this throws an exception.
As an alternative I can use a string resource referencing the path to
the .xsd file but would prefer just to add .xsd file to the resource
and use it di
-
- Echo Console.WriteLine to a File - and still see screen output
by BDC1997
- 5 Replies
- Last post
by BDC1997
- I am rather new to C# - so excuse the "deer in the headlights" look
I am doing the following to write a "Log" Text File:
System.IO. StreamWriter LogToFile = new System.IO. StreamWriter (mstrOutDir + mstrFileName + ".txt" );
LogToFile.AutoFlush = true ;
Console .SetOut(LogToFile);
This is legacy code with many, many Console.WriteLine
-
- Does string[] implement IList<object>
by nikov
- 7 Replies
- Last post
by Feng Chen - MSFT
- Code Snippet
using System;
using System.Collections.Generic;
static class Program
{
static void Main()
{
object s = new string [] {};
Console .WriteLine(s is IList < object >); // True
foreach ( Type iface in s.GetType().GetInterfaces())
{
if (iface == typeof ( IList < object >))
Console .
-
- Nebie to .NET needs resources
by Robert Meek
- 3 Replies
- Last post
by nobugz
- I've been programming in Delphi since version 1. It's the only language I know being self-taught. I wanted to get into NET and so when I saw that RemObjects had partnerd up with Microsoft and released a VS 2005 version w/Chrome allowing fully compatible .NET code in Object pascal I jumped on it right away!
But even though I am able to figure out quite a lot of the language syntax and even find
-
- Setting xslt param value from Javascript
by mswin
- 1 Replies
- Last post
by Martin Honnen
- Hi
I have a requirement, to set the xslt param or variable value from with in javascript. I want to use that variable in my xslt to load another xslt.
Is there a way to that. In the normal javascript I want to do that.
Please help me if there is a way to that.
Here is the code that I am trying:
< xsl aram name = " mytestvar " />
< xsl:template match =
-
- easy Regex.Replace() question
by David Krmpotic
- 10 Replies
- Last post
by OmegaMan
- I am using Regex.Replace(string, string, string) in this way: Regex.Replace("Gloria Estefan (1993) - Yesterday", "^Gloria Estefan (1993)", "Gloria Estefan"); So I want to change the artist name so it doesn't include the year anymore. The problem is that this doesn't work because of brackets! So this would work: Regex.Replace("Gloria Estefan - Yesterday", "^Gloria Estefan", "Beatles"); How can I m
-
- Thread abort exception when running timer.
by anoop23
- 4 Replies
- Last post
by Wenlong Dong - MSFT
- Hi, Im running a timer to Unzip a zip file using a 'ICSharpCode.SharpZipLib.dll'. It works well when I block the main thread indefinitely by 'thread.sleep(-1)'. But gets an ThreadAbort Exception if i run the timer without thread blocking. How can i avoid this error Im not using thread.abort anywhere in my code.My code to unzip file is taking only 6 sec to complete. Below im showing the code.
Co
-
- Is It Possible TO Write An IIS6.0 Web Service Which Is Always Running And Spawns Other Threads?
by LeonS
- 3 Replies
- Last post
by LeonS
- Hi.
Is It Possible TO Write An IIS6.0 Web Service Which Is Always Running And Spawns Other Threads I would like to write a module/service that I can add-on to my IIS6.0 server. I want the process to have at least two threads. One thread while always be polling a remote database. The other thread can handle HTTP requests.
Which technology will allow this .NET Remoting Web Services
-
- Are Generic Collection Serializable?
by vbjunkie
- 2 Replies
- Last post
by vbjunkie
- I was just wondering if the Generic Collections are serializable.
We are building a distributed Framework and wondering if it's better to return an array of customers or using the generic collections from a serialization point of view.
Any advice
Thanks
-
- How can I will Write XML node after an XML node in c# -- need urgent help
by Vishnu Narayan
- 8 Replies
- Last post
by Vishnu Narayan
- Hello every one, I was tried to write an new XML node after an XML node but it always added at the root element of the xml. I have to add the node 'LinkURL' and 'LinkText' where it finds value of node 'RefId' = 3 below is the few lines of XML file structure. ------------------------------------------------------------------------------------------------------------------ <ScreenToSupport>
-
- Unable to build Expense sample -missing references
by msnsitary
- 12 Replies
- Last post
by Woody_Wu
- I downloaded the Aug 15 CTP and the latest samples. I followed the Readme.doc instructions. I get 9 errors, all to do with missing *PartViewContract interfaces:
Error 1 The type or namespace name 'IApprovalPartViewContract' could not be found (are you missing a using directive or an assembly reference ) C:\Samples\Expense\ExpenseClient\Expense\ApprovalPartView.xaml.cs 36 17 Expense
Si
-
- Not receiving all packets from async socket over UDP
by patomalo88888
- 3 Replies
- Last post
by JonCole - MSFT
- Hello, Intro Hopefully someone can help me with this problem I'm using .net sockets to transmit data over 60Kbytes in length over UDP. When I begin sending these ~60Kbytes packets, the sending side shows that all the messages are sent. The receiving side however, only receives 60-95% of the packets 95% of the time. I send these packets a total of 47 times consecutively. Diagnostics 1) I've place
-
- HTTP form encoding
by dapi
- 2 Replies
- Last post
by Jorg Jooss - MSFT
- Hi, In my http client application I need to submit a form programmatically using HttpWebRequest class. I understand that the field data need to be encoded before sending to the web server. Is there a built-in class in .net that could help me encode data before sending Cheers! D2
-
- SSL x.509 certificate issue while using it in asp.net 2.0
by Janakiraman81
- 1 Replies
- Last post
by SathikKhan
- Hi,
I have written a web application and using SSL x.509 certificate in my ASP.net 2.0. When i try to call web service method on server, i get below error message.
The request was aborted: Could not create SSL/TLS secure channel.
Below is my piece of code.
string certName = "Web Server UKEBUDVSD75";
// WSE 2.0 method // Open the Local m
-
- Problems invoking C# callback from unmanaged C++
by Gradew
- 3 Replies
- Last post
by nobugz
- Hello, I am experiencing problems with a wrapped unmanaged C++ library. Here is where I've got so far: - we (at work) have a C++ library that we need to use in our C# application. No C# version of this library was ever made or will ever be. - the C++ library is exported to a DLL, then imported in a managed/CLI C++ class, which in turn exports it to C#. Everything is working fine, except for one th
-
- WMI calls from my .net code in a thread on 64 bit machine.
by AmitChaudhary
- 2 Replies
- Last post
by AmitChaudhary
- I am making WMI calls from my .net code in a thread. This code works fine when executed on 32-bit machine. But when the code is executed on a 64 bit machine, an Exception : System.NullReferenceException is thrown at managementObjectSearcher.Get() statement.
Any pointers...
-
- Problem in distributed transaction
by Subbu Rao
- 6 Replies
- Last post
by Subbu Rao
- I am using the below code to achieve Distributed transaction.But it is showing the error " Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding " & aborting the transaction. Also there is problem in opening second connection.Please give the solution for this
Here is the code:
public int CreateTransactionScope( stri
-
- Retrieve Domain Controller Names?
by b_e_n_u_k
- 1 Replies
- Last post
by b_e_n_u_k
- All,
I am connecting to Active Directory using LDAP via the System.DirectoryServices namespace. I have have the domain name (e.g. mydomain) and credentials to access active directory.
If a domain has multiple controllers, I need to get the each controllers fully qualified address, e.g. ServerName.MyDomain.co.uk. I have written the code below, however it seems flakey. Sometimes acces