CS0006: Metadata file could not be found
Hi all,
I've been happily developing an asp.net application for several months
now that uses the data and exception management application blocks.
All was fine until I tried to run the app in debug this morning and
got the following :
Compiler Error Message: CS0006: Metadata file
'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net
files\wso\c6edba50\cef3a07\assembly\dl2\8b3cbee0\005ab7a3_8112c401\microsoft.applicationblocks.exceptionmanagement.interfaces.dll'
could not be found
I've removed the references to the block dlls and put them back in,
I've checked that index server is disabled, and I've rebooted and
tried again... all without success.
I'm a bit baffled as this worked fine yesterday, and nothing has
changed between then and today other thatn the machine had been
rebooted this morning the same as it is every morning...... Any
ideas??
Many thanks
Pete Baugh Tag: Disabling network adapter Tag: 74420
Problem with windows services created through .Net
Hi guys/gals
I had created a service in .Net. The name of the service is VCSService.exe. This VCSService.exe is in turn is calling another exe called as VCSFiles.exe. The exe VCSFiles.exe is displaying the windows DOMAIN NAME and the USER NAME of the system. I am running windows 2000. Let us say my DOMAIN NAME is "SEMANITCINDIA" and the USERNAME is "hitesh vibhakar". The same result i am able to get when i execute my VCSFiles.exe directly. But when i am calling this exe through my service ie. VCSService.exe, it is displaying the DOMAINNAME as "NT AUTHORITY" and USERNAME as "SYSTEM". During the creation of my service, the account type, i had specified is "LOCAL SYSTEM" and my service is an interactive service
So what is the reason for this problem. ie. why my service is showing the different domain name and username ? as it is affecting my further manipulation in the VCSFiles.exe. Plz provide a solution regarding this problem at the earliest. Tag: Disabling network adapter Tag: 74410
SerialPort
There is a SerialPort sample on gotdotnet which seems to originate from Microsoft, and is described as being "similar to what we will be adding in a future version of the Framework"
http://www.gotdotnet.com/community/usersamples/Default.aspx?query=SerialPor
Compatibility with a future version of the framework is a compelling reason to use this component, but the comments on gotdotnet indicate that the component has a number of apparently serious bugs. Are there any plans to release an update to clear some/all of these bugs
Thanks
Joe Tag: Disabling network adapter Tag: 74409
New Project
The explorer for a new project only shows me Visaul Basic, Setup and "other" projects. But in "other" projects I only can find a Blank Solution
I'd like to start a C# project but it is not possible even though .NET Enterprise architect is fully installed.
How can I link c# and Help projects to this "New project" explorer?
Thanks in advanc
Robert Haerle Tag: Disabling network adapter Tag: 74404
Faxing
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C4334F.6BB03700
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Does somebody know why the foolowing code
throws an System.Runtime.InteropServices.COMException exception with =
the message of 'Unspecified error'?
FaxServerClass fxsvr =3D new FaxServerClass();
fxsvr.Connect(""); // null for local fax server otherwise a computername
I use the FAXCOMLib library under Windows 2000.
Thanks,
Mircea
------=_NextPart_000_0008_01C4334F.6BB03700
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Does somebody know why the foolowing=20
code</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>throws=20
an System.Runtime.InteropServices.COMException exception with =
the=20
message of 'Unspecified error'?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<P><FONT face=3DArial size=3D2>FaxServerClass fxsvr =3D new=20
FaxServerClass();</FONT></P>
<P><FONT face=3DArial size=3D2>fxsvr.Connect(""); // null for local fax =
server=20
otherwise a computername</FONT></P>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I use the FAXCOMLib library under =
Windows=20
2000.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> Mircea</FONT></DIV>
<DIV><BR></DIV></BODY></HTML>
------=_NextPart_000_0008_01C4334F.6BB03700-- Tag: Disabling network adapter Tag: 74403
Remote Administration
I developed and run some ASP.NET applications on my local machine. I have
IIS 5.0 available on two servers from two different ISPs. I would like to
have the applications served from the two ISP controlled machines. I have
FTP-access (only) to the two remote servers.
Simple .aspx applications execute (such as trace) but .aspx applications
with a .aspx.cs code behind file fail on the statement ...
<%@ Page language="c#" Codebehind="Sample.aspx.cs" AutoEventWireup="false"
Inherits="Sample.Sample" %>
... because it can not resolve the Sample.Sample
Any suggestions on how to proceed?
Is there documentation available on installing an application on a remote
ISP-controlled machine?
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
-- Tag: Disabling network adapter Tag: 74399
Fail to use ManagementOption to connect network drive
hihi
I had tried to follow MSDN sample code of System.Management.ManagementOption to connect network drive. But when i use scope.Connect(), it occurs Exception. I just use it to connect other computer shared drive. I had type user name and password. The path just is "\\\\computerName\\shareName" or "\\\\IPAddress\\shareName" that both are fail. Anyone tried it
thx... Tag: Disabling network adapter Tag: 74398
Usage of AppDomain.CreateInstanceFromAndUnwrap method
i am trying to load a Windows Form Assembly at run time to a seprate AppDomain.
I don't want that this Assembly to be loaded in the Caller Domain, so i used the metho
CreateInstanceFromAndUnwrap instead of AppDomain.Load(..
// I am passing the Control's parent through the constructor argumen
Object[] args1 = new Object[] {this}
AppDomainSetup info = new AppDomainSetup()
info.ApplicationBase = "file:///" + System.Environment.CurrentDirectory
AppDomain MyDomain = AppDomain.CreateDomain("MyDomain", null, info)
MyControl.MyControl Ctrl = (MyControl.MyControl) MyDomain.CreateInstanceFromAndUnwrap("D:\Test\MyControl.dll",MyControl.MyControl
false,BindingFlags.Public,null,args1,null,null,null)
But when i do this i get an exception thrown "Constructor on type MyControl.MyControl not found
What should be cause of this issue?
If i try to use the CreateInstanceFromAndUnwrap using the two parameters just the assembly and type, the functio
returns me the control object. But when i try to set the Parent of the control using the followin
code
Ctrl.Parent = this
then system throws an exception the message is
The type System.Windows.Forms.Form+ControlCollection in Assembly System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 is not marked as serializable
What am i doing any thing wrong in this both scenarios
Or is it advisable to have a design where i can load my Windows Forms Assemblies in to a seprat
Domain and use, and later unload it
Any body please help.... Tag: Disabling network adapter Tag: 74397
How to map network drive in windows service without using API in C#
hihi
I need to use windows service to connect network drive, so I cannot use "net use" to connect network drive. I hope it can connect the network drive under windows service. Therefore if I don't want to use API WNetAddConnection function, any C# Class can do it directly
thx... Tag: Disabling network adapter Tag: 74394
How does the DataView.Sort method really work under the covers?
How does the DataView.Sort method really work under the covers?
I know that it sorts a dataview, but what kind of sorting algorhythm is
actually used?
Thanks. Tag: Disabling network adapter Tag: 74392
Sorting
Hi All,
I have an xml file as listed below. This is a list of scripts. Some of the
scripts depend on the output of other scripts. I want to sort this xml in
such a way that the scripts are listed in the correct order of execution. I
created an IComparer class and implememted the Compare method. I am calling
Array.Sort on an XmlNode array. The sorting is not correct. Can anyone
suggest a correct algorithm for a compare method to sort this XML?
Thanks.
James
<root>
<scripts>
<script>
<name>script0</name>
<sequence>0</sequence>
<references>script6|script14|script20|script4|script24|script16|script9|scri
pt22|script25</references>
</script>
<script>
<name>script1</name>
<sequence>1</sequence>
<references>script0|script6|script14|script9|script25|script15</references>
</script>
<script>
<name>script2</name>
<sequence>2</sequence>
<references>script10|script6</references>
</script>
<script>
<name>script3</name>
<sequence>3</sequence>
<references>script0|script6</references>
</script>
<script>
<name>script4</name>
<sequence>4</sequence>
<references>script6|script20</references>
</script>
<script>
<name>script5</name>
<sequence>5</sequence>
<references>script6</references>
</script>
<script>
<name>script6</name>
<sequence>6</sequence>
<references>
</references>
</script>
<script>
<name>script7</name>
<sequence>7</sequence>
<references>script10|script6|script14</references>
</script>
<script>
<name>script8</name>
<sequence>8</sequence>
<references>script10|script6|script14</references>
</script>
<script>
<name>script9</name>
<sequence>9</sequence>
<references>script7|script8|script10|script11|script2</references>
</script>
<script>
<name>script10</name>
<sequence>10</sequence>
<references>
</references>
</script>
<script>
<name>script11</name>
<sequence>11</sequence>
<references>script14|script6|script2|script10</references>
</script>
<script>
<name>script12</name>
<sequence>12</sequence>
<references>script6|script0</references>
</script>
<script>
<name>script13</name>
<sequence>13</sequence>
<references>script14|script6</references>
</script>
<script>
<name>script14</name>
<sequence>14</sequence>
<references>script6</references>
</script>
<script>
<name>script15</name>
<sequence>15</sequence>
<references>
</references>
</script>
<script>
<name>script16</name>
<sequence>16</sequence>
<references>script6|script20</references>
</script>
<script>
<name>script17</name>
<sequence>17</sequence>
<references>script6|script18</references>
</script>
<script>
<name>script18</name>
<sequence>18</sequence>
<references>script6|script25</references>
</script>
<script>
<name>script19</name>
<sequence>19</sequence>
<references>script6</references>
</script>
<script>
<name>script20</name>
<sequence>20</sequence>
<references>script6|script15</references>
</script>
<script>
<name>script21</name>
<sequence>21</sequence>
<references>script6|script24|script0|script20</references>
</script>
<script>
<name>script22</name>
<sequence>22</sequence>
<references>script6|script15|script24|script20</references>
</script>
<script>
<name>script23</name>
<sequence>23</sequence>
<references>
</references>
</script>
<script>
<name>script24</name>
<sequence>24</sequence>
<references>script6|script25</references>
</script>
<script>
<name>script25</name>
<sequence>25</sequence>
<references>script6</references>
</script>
<script>
<name>script25</name>
<sequence>26</sequence>
<references>script0|script2|script4|script7|script8|script9|script10|script1
1|script14|script19|script18|script20|script24|script25|script16|script5|scr
ipt22|script15|script6|script1</references>
</script>
</scripts>
</root> Tag: Disabling network adapter Tag: 74387
File.Move and NTFS File Permissions on the Source
I realize that File.Move is a thin wrapper around the Win32 MoveFile
API, so what I'm about to describe I think applies to that API. If NTFS
permissions grant you read access to the source file but deny you the
rights to delete the source file, I believe I've discovered -- much to
my surprise -- that File.Move will copy the file to the target but fail
to delete the source. And do this without returning an error (or
equivalently, in managed code, without throwing an exception).
I've included a tiny console app that I used to test. Does anyone know
if this is expected behavior? I've come across no documentation or
comments to suggest that this is correct.
In my application, this behavior will be problematic -- i.e. if the
source cannot be deleted, I need the call to not do anything. I suspect
I'll have to do the copy and delete as separate calls...
using System;
using System.IO;
namespace MoveTester
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
if (args.Length != 2)
throw new ArgumentException("Usage:
MoveTester <sourcefile> <destfile>");
string File1 = args[0];
string File2 = args[1];
Console.WriteLine("Moving file {0} to {1}", File1,
File2);
try {
File.Move(File1, File2);
Console.WriteLine("Done!");
}
catch (Exception E) {
Console.WriteLine(E.ToString());
}
}
}
} Tag: Disabling network adapter Tag: 74385
C# LDAP libraries and ASP.NET
Hi All
I am trying to authenticate users against a Novell LDAP v3 using ASP.NET
and C# LDAP classes. I have compiled the files to one assembly and
reference it in my code. My problem is the following: I can connect
successfully to the LDAP server, but as soon as I try to Search or Bind,
the following error occurs - "Server did not return any data". Here is the
code sample:
using Novell.Directory.Ldap;
LdapConnection ldapConn = new LdapConnection;
ldapConn.Connect("192.000.0.00",389); // use proper LDAP Server IP Address
if(ldapConn.Connected)
{
ldapConn.Bind("cn=yourname,ou=IT,ou=WEB,o=ORG","password");
}
PLEASE HELP!!! I really need some HELP here. The LDAP directory has the
following schema or structure: ORG -> WEB -> IT -> user data
I did not find any documentation with the C# LDAP classes and URGENTLY
need some help in searching and binding.
All help is HIGHLY APPRECIATED.
Thank you
Walter Tag: Disabling network adapter Tag: 74384
.NET Framework AutoUpdater
Some of you might be interested in this open source AutoUpdater for
.NET
"Sharp AutoUpdater provides an auto-update feature for .NET
applications. Using XML configuration files, Sharp AutoUpdater
component detects if there is a new version of the software,
downloads, unzips, and installs the new files."
Link: http://csautoupdater.sourceforge.net/ Tag: Disabling network adapter Tag: 74382
clipboardformat, Xml Spreadsheet
Can anyone help me with copying spreadsheet format to the clipboard.
I have this text
<Workbook>
<Worksheet>
<Table>
<Row>
<Cell ss:Type="String">MyData</Cell>
<Cell ss:Type="String">MyData</Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
I put that into a memorystream (UTF8),
then call
DataObject ob = new DataObject();
ob.SetData("XML Spreadsheet", ob);
Clipboard.SetDataObject(ob, true)
When I try to paste this into excel it complains that it can't paste the
data.
what am I doing wrong? Tag: Disabling network adapter Tag: 74380
Application Blocks: ExceptionXmlPublisher log viewer?
I'm using the ExceptionXmlPublisher provided by Kirk Evans.
Is there a log viewer or xsl stylesheet to read the xml put out by the
publisher? It's not well-formed xml (no root element) and it's deep.
Any help would be great.
Thanks.
--Mark
majohnson@gr.com Tag: Disabling network adapter Tag: 74376
Rolling my own Install w/ MSDE
I rolled my own install that checks to see if SQL server is there like so
Dim svc As ServiceProcess.ServiceControlle
Tr
svc = New ServiceProcess.ServiceController("MSSQLServer"
Catch ex As Exceptio
Return ValRetCodes.NotInstalle
Exit Functio
End Tr
Dim startDate As DateTim
If Not IsNothing(svc) The
..
Els
Return ValRetCodes.NotInstalle
End I
Problem... on one user's box it runs, starts MSDE's install, but stops because it found datafiles
C:\Program Files\Microsoft SQL Server\MSSQL\Data\master.md
C:\Program Files\Microsoft SQL Server\MSSQL\Data\mastlog.ld
So my check was fruitless. Is MSDE installed? Is SQL installed? What's a better way to check, and if it's installed, how can I use it for my database, or should I? Tag: Disabling network adapter Tag: 74375
Software and Hardware Inventory
Hi,
There are some good extensive samples or components that make software and hardware inventory with WMI easy
I'm seeking some examples or WMI class/property listing to catch the components in the machine that mades up a good software/hardware inventory.
Regards
Lucas Ponzo Tag: Disabling network adapter Tag: 74374
IDisposable.Dispose, Object.Finalize and threads
IDisposable.Dispose is documented as the method where you have to release
unmanaged resources.
Dispose is called by Finalize.
Finalize is called by garbage collector after the object becomes
inaccessible.
The documentation says: "The thread on which the finalizer is run is
unspecified".
So the question is: My object has allocated a [win32] window handle using
CreateWindow (called using P/Invoke) and has to destroy it. But Win32 SDK
say that DestroyWindow has to be called from the same thread that called
CreateWindow. This seems impossible given Dispose/Finalize/GC patern.
Any advice ?
btw: Let me know if I should post to another group.
--
francois.piette@overbyte.be
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be Tag: Disabling network adapter Tag: 74373
question about paging in Datagrid
question about paging in Datagrid.
i would like to ask, normally, we bind the datagrid with DataSet
if a query like "select * from item" contains 1000000 records, it seems that
getting all the records and load it in the memory(DataSet) is a
resource-consuming task. (please correct me if i say something wrong)
So, i was planning to connect to database and fetch 10 items each time, when
page is changed, connect to database again and fetch next 10 items.
Is my planning a good way to save the resources? or Paging in datagrid has
done something to save the resource? Tag: Disabling network adapter Tag: 74372
Using Help remotely
Hi,
I have a client program that is one touch installed and hosted on an IIS server.
My question is, what is the best way to provide user interface help to the client program.
Two ideas have come to mind.
1) - Let the client program download the .chm and reference it locally. This is probably a pain.
2) - Let the client do remote calls to the server to request the help and the server then returns the requested help info. Not
really sure exactly how I would make that work.
Since I am not sure that either of these ideas is really workable, there must be a third and correct way. Would someone please
enlighten me as to what it is?
Thanks
-------------------------------------------
Roy Chastain
KMSystems, Inc. Tag: Disabling network adapter Tag: 74370
How to cancel a pending BeginReceive ?
What is the proper way to cancel a pending BeginReceive/EndReceive ?
Can it be done without generating an exception ?
Currently I shutdown and close the socket. The blocking "EndReceive"
throws System.ObjectDisposedException.
I try to avoid throwing exceptions when ever possible, and reserve
them for unanticipated problems. Trying to stop a background
read/process loop is an anticipated activity. For me the debugger
delays 15 seconds when ever an exception is thrown. But regardless, I
am hoping for a cleaner approach. I can not find guidance on this
issue in framework documentation.
Forgive the cross posts. It would be nice to have a specific
framework/network related NG.
Thanks for any insight - Best regards - Lee Gillie - Spokane, WA Tag: Disabling network adapter Tag: 74367
how to embed xml data in resx file
Hi,
I am trying to embed xml data within resx file without success. Here's
my data tag -
<data name="foo" type="System.String, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value><![CDATA[ <myroot><otherdata>blah..<otherdata></myroot>
]]>
</value>
Even though I have used CDATA section, I get "blah..." when I try to
access "foo" as opposed to my xml data "<myroot>.....</myroot>".
Thank you.
Regards,
Amitava Shee Tag: Disabling network adapter Tag: 74364
Signing Assemblies
Using VS .Net 2003
1. I'm confused on how to remove compile errors below.
Not sure if I need/how to use Al.exe and Gacutil.exe tools
with VS, etc.
2. My company doesn't have a private key and the local
windows application I'm creating is for internal company
network use only. Should I create a public key?
3. My goal is to compile a Release version of the
application to the network and then use caspol tool to
trust assembly. Make Sense?
Steps:
(a) Created key pair (sn -k foo.snk) and copied foo.snk
to C# project \obj directory (is my next step: sn -p
foo.snk fooPub.snk & AssemblyDelaySign(true) &
AssemblyKeyFile (fooPub.snk) ???)
(b) Changed AssemblyInfo.cs contents:
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile(@"C:\...\obj\foo.snk")]
[assembly: AssemblyKeyName("")]
(c) Resulting compile errors (2):
Assbly gen. failed -- Ref assbly 'Interop.Word'
& 'Interop.Excel' no strong name
Thanks - Steve Tag: Disabling network adapter Tag: 74363
HELP-Sorted Datagrids and modal dialogs
I have been on newsgroup for week. I have seen anything that will help me. Basically, I have a form with a datagrid that can be sorted or unsorted (it is up to the user). Then, I display the data of the selected row in textboxes on dialog that execute by the user press a button. The following code works if I do not sort the datagrid before I press the button to bring up the dialog. It is when I sort it the datagrid I have the issue
private void Frm_CustomerAU_Load(object sender, System.EventArgs e
Frm_Customers frmCustomers= (Frm_Customers) this.Owner;
CurrencyManager currencyMgr = (CurrencyManager)this.BindingContext[frmCustomers.tableInfoDG.DataSource, "Table"]
currencyMgr.Position = frmCustomers.tableInfoDG.CurrentRowIndex
DataRow currentRow = ((DataRowView)currencyMgr.Current).Row
txtBxCompanyName.Text= currentRow["CompanyName"].ToString()
I have also tried using the following code to bind the table to the textbox and I get the same result
txtBxCompanyName.DataBindings.Add("Text", frmCustomers.tableInfoDG.DataSource, "Table.CompanyName")
I believe it has something to do what I am setting CurrencyManager position to ( currencyMgr.Position = frmCustomers.tableInfoDG.CurrentRowIndex;). I know I need it to be the position of the underlying table in order to get the selected position in the datagrid. I just do not know how to get the position. By the way, this is C
Any help would be greatly appreciated Tag: Disabling network adapter Tag: 74362
compacframework
Hi!
I want develop an app for pocket pc that use IPv6, and I have installed
VStudio .NET 2003, but it hasn't projects for PPC 2003, (PPC 2002 hasn't
support for ipv6). Is it possible install some for have PPC 2003 (service
pack, ...)?
Thanks! Tag: Disabling network adapter Tag: 74351
How to map network drive in C#?
hihi
when I am using Platform SDK, I can use WNetAddConnection2 to connect the network drive. But i cannot found these similar function or method in C#. Anyone know C# has this class to do it?
thx... Tag: Disabling network adapter Tag: 74347
Changing reference from 1.0 framework dll's to 1.1 framework dll
Hello,
I am developing an application using ASP.NET and ORACLE. Initially I loaded Visula studio . NET 1.0 framework and later updated it Framework 1.1 . So, now, I got two different directories "WINNT\Microsoft.NET\Framework\v1.0.3705" and "WINNT\Microsoft.NET\Framework\v1.1.4322", in my system holding dll's. At present, this application is referencing to 1.0 Frameworks dlls (e.g. system.dll,system.data.dll etc). But, now I want to change this reference to access dl's from 1.1 framework so that I can use other useful methods and features. For this, When I removed the reference of existing dll and then tried to add NEW reference of dll's from 1.1 framework directory, I am getting MANY compilation error. Could any one help me to resolve this problem? My goal is to change the reference of dll's to access 1.1 framework's dll instead of 1.0.
Regards,
Ajay
---
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. Tag: Disabling network adapter Tag: 74345
Running the backup utility programaticly
Hi ,all
is there a way to run NtBackup from vb.net. I know i can use shell ,proccess
or Win32API. But what is best and how to do it.
TIA Tag: Disabling network adapter Tag: 74343
Pound sign and everthing following are get lost when using QueryString for value transfering in ASP
(Type your message here)
I have two asp script files A.asp and B.asp.
In A.asp, I am doing database query. The query string looks like
"SELECT * From Where PublishDate Between #02-02-04# And #03-03-04"
I tried to using QueryString to transfer the query string to B.asp.
The statement looks like
Sql = "SELECT * From Where PublishDate Between #02-02-04# And #03-03-04"
<a Href="B.asp?QueryString=Sql">XXXX</A>
However, it turned out that the first # and everything following got lost
Anybody could help!
Thanks in advance!
Yong Chen
HKU, CSIS
--------------------------------
From: Yong Chen
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>L5cSB89+t0eNfdbhCkjJgQ==</Id> Tag: Disabling network adapter Tag: 74338
Using DSOleFile to read double-byte character file
Hi,
I am using DSOleFile to access double-byte character file property
information but it does not seem to retrieve the information correctly. Can
someone tell me how to use the DSOleFile.exe to access double-type character
file property information?
Thanks in advance. Tag: Disabling network adapter Tag: 74333
Problem with WebProxy class
I recently encountered a problem with the following piece of code in
an ASP.NET application that has been running successfully for a couple
of months. It requests a web-page from an external web-site, using
our corporate proxy.
Our company has two proxy servers with the same DNS name. If you
execute the nslookup command (at the Windows command prompt), two IP
addresses are returned. When one of the proxy server crashes (as it
did the other day), Internet Explorer continues to work correctly.
However my code failed until the dead proxy server was fixed. It
seemed to cache the IP address of the failed proxy server and continue
to try and use that machine rather than switching to the live machine.
Is there anything I can do to stop this behaviour?
Here is the code:
HttpWebRequest hwrRequest = (HttpWebRequest)WebRequest.Create(
IntranetConfiguration.ExternalSystemConnectionStrings[sExternalSystemKey]);
hwrRequest.Timeout = REQUEST_TIMEOUT;
//Set up proxy information
hwrRequest.Proxy = new WebProxy(
IntranetConfiguration.Proxy.Address,
IntranetConfiguration.Proxy.Port);
hwrRequest.Proxy.Credentials = new NetworkCredential(
IntranetConfiguration.Proxy.Username,
IntranetConfiguration.Proxy.Password);
//Go and get text response from Shareprice service
HttpWebResponse hwrResponse =
(HttpWebResponse)hwrRequest.GetResponse();
Stream strResponse = hwrResponse.GetResponseStream();
StreamReader srResponse = new StreamReader(strResponse);
sHtmlText = srResponse.ReadToEnd(); Tag: Disabling network adapter Tag: 74328
CSharpCodeProvider.CreateParser
Are there any plans to implement a parser for CSharp code? - I could really use it! Tag: Disabling network adapter Tag: 74321
Urgent: Help to set Encoding for OracleDataReader
Hi
I'd like to set Encoding to OracleDataReader/OracleCommand or relative class (just like StreamReader class constructor). Is that possible
Thank
Peter Tag: Disabling network adapter Tag: 74320
Migrating Windows Forms to ASP.NET
is there an easy way to convert a Windows Forms app to an ASP.NET one? I
understand there are UI and control differences which may arise but, in general,
is this an easy conversion?
Thanks.
samantha. Tag: Disabling network adapter Tag: 74307
Cannot open ASP.NET projects on IIS 6/ Win2k3 running WSS
Hi,
I have a Windows 2003 server running Windows Shareporint Services 2.0.
After I installed WSS I am to able to open any web project that is located
on my default web site from VS 2003.
I can't borwse to the site either. It is as if the site does not exist.
Does anyone know how I can fix this issue?
The configuration that I am running is
Windows 2003 server
WSS 2.0
.NET framework 1.1
VS.NET 2003
TIA Tag: Disabling network adapter Tag: 74303
Memory/Leak Tool?
I have a Windows app (it will be promoted to a Service once this problem is
sorted out) that cyclically, every minute, connects to five SQL Servers over
the WAN, extract data and insert the data in a local SQL Server, using the
OLEDB provider. Every cycle I create one local connection and five remote
connections, do the stuff, close the connections and dispose everything that
has a Dispose method (OleDbConnection, OleDbDataAdapter and OleDbCommand).
After running overnight the performance degrades and if I examine the
Private Bytes of the process (using Performance Monitor, the way we looked
for memory leaks before DOTNET in C++, but should still be valid), it goes
up from approx. 1.3 MB to over 2 MB.
I've been using DOTNET from the first Beta and never thought I'd say this,
but I suspect a leak.
Is there a method/tool that will show me the type of DOTNET objects being
leaked, or give me some indication of where to look for the problem?
Thanks. Tag: Disabling network adapter Tag: 74302
StrongNameIdentityPermission do not working with WinForm
I'm invoking the same Dll from Console application and WinForm application
Both signed with SrongName.
the class that I'm invoking is protected with StrongNameIdentityPermission
Demand
and hear is what happened:
the console application pass the demand but the WinForm failed
i had try to union the StrongNameIdentityPermission blob with the mscorlib
StrongName
but it still behave is the same way.
Do someone know to solve this issue ????
TNX
Bnaya Eshet Tag: Disabling network adapter Tag: 74300
Finding process user identity
Hi
I am using the System.Diagnostics.Process class to find information about the running process on, lets say win2k. I can get to almost all the information I need from the Process object except the user name that the process is running as. In the Task Manager, I can see the process Image Name, User Name, CPU, etc. Here is the code example of what I am doing
Process[] procs = null
string processList = ""
procs = Process.GetProcesses()
for(int i = 0; i <= procs.GetUpperBound(0); i++
Console.WriteLine(procs[i].ProcessName.ToString() + " is still responding!")
The question is, how can I get to the User Name for a specific process? Do I have to use Win API to do this
Cheers. Tag: Disabling network adapter Tag: 74299
dispaly group button name in taskbar
When my c# app appear as in individual buttons in the XP taskbar, the button
text is correct. However when Windows XP group groups the buttons together.
the combined button is blank. How can I fix it? Tag: Disabling network adapter Tag: 74293
Arabic Strings
Hello,
how could i go about replacing normal latin numerals in a string containig
arabic characters.
Using the string builder when i append the numerals come in front of the
arabic characters.. and not after the arabic characters..
What is the suggested method to do this..
Regard
Sajay Tag: Disabling network adapter Tag: 74288
Thread question
Child threads aren't allowed to touch main thread objects. The session
object in ASP.NET belongs to the main thread. The way around this is to pass
in a reference in the thread constructor so that the child thread can use
the object safely since there is no control.invoke available like in
winforms.
Why does this work? This has been bugging for a while.
So the class would look something like this:
public class test
{
public test(HttpContext currObject);.....
and the call would be test t = new (HttpContext.Current);
Technically, I can't see what is happening behind the scenes to force thread
safety. Anybody?
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok Tag: Disabling network adapter Tag: 74287
string, GetHashCode, and uniqueness
hi all,
msdn says:
"the implementation of GetHashCode provided by the String class
returns unique hash codes for unique string values."
source:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemobjectclassgethashcodetopic.asp
sure, hashes must try to yield good distribution but
how could uniqueness be guarranteed in this case?
is it best effort? is it under certain conditions?
GetHashCode returns an int and so it is limited to a 32-bit
number. that's a big number but there are infinite
varieties of strings. just imagine a, aa, aaa, aaaa, aaaaa,
ad infinitum. and that's just using the letter 'a'.
thanks in advance for clarification,
rh Tag: Disabling network adapter Tag: 74286
How to stop users from clicking buttons more than once?
I have a C# asp.net page that when you click a button, it writes a record
(based on entered values) to the database. I've found that if you click the
button multiple times quickly, multiple records are written. What is the
best way to deal with this? The page takes a few seconds to process after
the button is clicked so it doesn't reach the point to be reloaded with the
button disabled. I tried disabling it with Javascript, but then the server
side events didn't fire. I tried setting a session variable as soon as the
button was clicked and only running the code if the variable was not set,
but that didn't work either. What is the best way to do this?
Thanks, Tag: Disabling network adapter Tag: 74283
wsdl.exe and Nillable Value Types
I am attempting to use wsdl.exe to generate a Web Service Client in C#
from a valid WSDL file generated by Apache Axis.
My application requires the ability to distinguish between an
unspecified value and a specified value. For that reason, the WSDL
that is generated by Apache Axis utilizes 'nillable="true"' to permit
Web Services Clients to indicate a value or specify 'nil'.
The problem I am having with .NET and wsdl.exe (that I did not have
with Apache Axis and Java Web Services Developer Pack) is with Value
Types.
Here is a portion of the WSDL presenting a problem:
<complexType abstract="true" name="Type">
<sequence>
<element name="localId" nillable="true" type="xsd:string"/>
<element name="id" minOccurs="0" maxOccurs="1" nillable="true"
type="xsd:int"/>
</sequence>
</complexType>
When wsdl.exe generates its class from this, it creates the following:
public abstract class Type {
public string localId;
public int id;
}
The problem is that the "int" is a Value Type that is incapable of
storing null. I have tried the following all to no avail:
1. Replacing 'type="xsd:int"' with 'type="soapenc:int' (which made
Java WSDP work)
2. Including/Removing 'minOccurs' and/or 'maxOccurs'
3. Manually replacing 'public int id' with 'public SqlInt id' (SqlInt
is not the correct name, but its the one from the SQL namespace that
is used to support nulls for ints in the DB ... .NET barked at me when
I attempted to use this telling me it can't be used for XML
serialization or some such thing).
I am out of ideas and wondering if you can guide me to a way to AVOID
having .NET pass a zero(0) when this attribute is not specified (which
is what it currently does for Value Types). I was hoping to find the
equivalent of java.lang.Integer (which can be null) in C# but have had
no success.
One last note: This WSDL will be consumed by clients who purchase the
software I am developing. They will be responsible for generating
their own Web Service Clients using the toolkit of their choice, so I
am trying to make it as standardized as possible while requiring
minimum client intervention/recoding when they generate the Web
Service client.
Thanks in advance for any suggestions.
Erik Tag: Disabling network adapter Tag: 74282
wsdl.exe and Two-Dimensional Arrays
I am attempting to use wsdl.exe to generate a Web Service Client in C#
from a valid WSDL file generated by Apache Axis.
There appear to be a problem recognizing a 2-Dimensional Array that
did not present a problem for the Apache Axis Toolkit or Java Web
Services Developer Pack Toolkit when they generated the client code.
"GridField" represents a 2-Dimensional Array of "Field". Here is a
snippet from the WSDL describing it.
<complexType name="GridField">
<complexContent>
<extension base="tns4:Field">
<sequence>
<element name="fields" nillable="true"
type="impl:ArrayOfArrayOf_tns4_Field"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="ArrayOfArrayOf_tns4_Field">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns4:Field[][]"/>
</restriction>
</complexContent>
</complexType>
<complexType abstract="true" name="Field">
<sequence>
<element name="name" nillable="true" type="xsd:string"/>
<element name="metaData" nillable="true" type="tns5:MetaData"/>
</sequence>
</complexType>
When wsdl.exe creates the Web Service Client code in C#, it generates
the following:
[System.Xml.Serialization.SoapTypeAttribute("GridField",
"urn:fields.axis.webservices.sparta.com")]
public class GridField : Field {
public Field[] fields; // Note: Only 1 Dimensional Array
}
I then go in and modify it to be "Field[][]" and all works fine.
Is there an explanation / workaround for this? Tag: Disabling network adapter Tag: 74280
Determine Assembly's .NET Framework Version
Hello,
If I have a .NET assembly, how do I determine what version of the .NET
framework it....
1) was compiled against
2) is supposed to use
3) is compatible with?
Is there a utility that will extract this info somehow?
thanks!
-ZD Tag: Disabling network adapter Tag: 74275
Delegate and Thread Problem
I have a Delegate based Project that contain classes whose purpose is to
instantiate objects of another Project (or Library) using Delegates. I have
a client application that uses this Delegate based project to call library
method asynchronously. Delegate based project returns the control to the
client immediately and so the client can perorm other tasks. Every thing
works fine but soon as i close the client application, the back ground
processing also ends. In other words, the Delegate based project and library
Project also stops. why is that? How can i call method using delegate that
continue the processing even if the client application terminates.
I can work around this scenario by creating threads and calling method in
thread. My client application calls the method of a project named
ThreadCreator. The ThreadCreator in turn creates a new thread and calls the
appropriate library method in that thread. Now even if the client
application terminates, my processing continues. The problem with this
approach is that my ThreadCreator project cant call method that takes
parameters. The work aournd here is to go for statefull object, but my
library objects are all stateless. How can i call method using thread that
takes parameters ?
Please answer for both scenario
Regards,
Irfan Tag: Disabling network adapter Tag: 74273
Hi
Can I disable a wireless network adapter with som dll functions or C# code
??