Execution in Visual Studio vs Native Execution
With regards to running a project in the Visual Studio developement
environment as opposed to executing the exe directly from the hard drive.....
I am developing an application in C# using VS.NET 2003...my application
seems to respond differently when i run it using the development environment
as opposed to when i run it directly from the exe. For instance, in my code i
have a try-catch block and inside the try block i explicitly throw an
exception and i handle it , for example, with a msg box or something. This
works fine when i run it using Visual Studio (even when running a Release
build) but when running it directly from the exe the dreaded "An unhandled
exception has occurred in your application. If u...etc" dialog box appears.
What is the reason for this? I am really stumped and dont know what i
can/should do since this is an intergral part of the application. Any help
will be greatly appreciated. Tag: Stop WindowsService Application Tag: 97337
Write to config file from deployment project
I have a deployment project where I collect the paths to 4 user defined
directories using user interface textboxes that are then mapped to folders in
the file system editor that are always created. This all works fine.
What I want to do is update the config file for the application so that if
any are changed the application will know what those folders are. I have
tried to use a Custom action to write the config file but the install
override does not seem to be called at all.
If you write an override in an installer class, how and where is this called?
I have looked at the Walkthrough for Passing Data to a Custom Action but the
method never seems to get fired.
Any help is appreciated.
PeterW Tag: Stop WindowsService Application Tag: 97334
Set Time Zone information
Hi,
I am trying to set the time zone information for a windows machine from
a C# application. I have written a wrapper class for win32 api
SetTimeZoneInformation and GetTimeZoneInformation. I am able to get all the
time zones and the current time zone information. But when I try to set a new
time zone information i see that the registry values get updated but the
actual windows clock does not display these changes. I also broadcast the
WM_SETTINGCHANGE message so all applications know about the changed time zone
information, but with no effect.
Also how to determine for whether it is daylight saving time from TZI
byte values.
Can anyone point me to documentation as to how to set the time zone in C# or
give some suggestions.
thanks in advance. Tag: Stop WindowsService Application Tag: 97333
Intercept POST command from ASP.NET
My window console application performs a batch processing job in=
a certain interval of time=2E It post (HTTP "POST") data in xml=
format to my ASP=2ENET application=2E My question is:
1=2E How does my ASP=2ENET application detects if a data is posted to=
it ? Is there any event driven stuffs that the ASP=2ENET=
application can deal with when a POST is detected ? Put it=
simply, my ASP=2ENET app should always be in "listening" mode=2E At=
the moment, I am looking into HTTP handler=2E Am I going for the=
right direction ?
2=2E How do I extract the xml data posted(by the console=
application) from ASP=2ENET app ?
Thanks in advance=2E
--------------------------------
From: Quest Quest
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>Vh38BH5W+USQwnJspjbOaw=3D=3D</Id> Tag: Stop WindowsService Application Tag: 97325
Problem with creating and verifying multipart/signed SMIME messages in c#
Does anybody have an idea of creating SMime multipart signed=
messages using CAPICOM/C#=2E I have tried the articles given in=
the MSDN and other help i founf on internet for changing IL code=
for marshalling of BSTR to native int but i want a solution=
which does not require any il code modification=2E If anybody can=
provide code that would be great=2E
Thanks=2E
--------------------------------
From: Vinay Pole
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>0qofPgUQxUqI0RgpqK/4sA=3D=3D</Id> Tag: Stop WindowsService Application Tag: 97321
DLL (COM) with .Net
I need to rebuild a COM Dll, which is consumed by many ASP pages, and desktop
applications. By simply calling the CreateObject,... from each application.
The requirment is to use the .Net // C# To do a same funtional DLL,
While keeping in mind that it should be still accessable from for all
application either ASP pages or desktop applications.
So what is the type of the project that should use to rebuild this new (DLL)
or Webservice,...
Regrds
--
MCSD not .Net yet :( Tag: Stop WindowsService Application Tag: 97319
question about click once
I haven't used it yet nor read the documentation (aheum.. :D)
however I'm planning too but wonder if:
Could I, with click once enabled application, have a notification panel
saying to the user:
-------------------
Attention please
-------------------
A new version of the application is available, would you like to download it
now?
-------------------
OK CANCEL
------------------
(followed by a nice "download progress" panel)
And control update the process from here?
or is it all hopelessly automatic.... Tag: Stop WindowsService Application Tag: 97318
Assembly loaded by a static (shared) function
As I understand it, the only way to unload an assembly from memory is to load
it in a separate appdomain and then unload that appdomain. However, I'm not
sure about this situation. Here's the question: If an assembly is loaded by
a static (shared) function, and no reference is maintained after that
function returns, does the assembly remain in memory? Just trying to get
this sorted out. Thanks! Tag: Stop WindowsService Application Tag: 97315
Data Conversion
Hello Everyone,
I am trying to display BSTR data in a message box,
but looks like messagebox does not support BSTR data,
can any one tell me how to acomplish this?
I would really appreciate your help
Thank you Tag: Stop WindowsService Application Tag: 97314
Reading the stream from a web response causes timeouts
Hi,
Im writing an application that crawls a website. One problem Ive come across
is that sometimes, when reading the contents of a web response, the
application will hang and timeout. This occurs when I am trying to read the
stream returned from the GetResponseStream of the HttpWebResponse object.
The code I am using is detailed below. I used the ReadFully method that Jon
Skeet outlines on his website, just to be safe.
http://www.yoda.arachsys.com/csharp/readbinary.html
In the example below, I find that while I can download the file and view it
using IE, when running my app, it frequently starts timing out after reading
aprx 700kb - if anyone could suggest where I am going wrong it would be
greatly appreciated.
Thanks in advance,
Mark Fletcher
using System;
using System.IO;
using System.Net;
namespace WebRequest2
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Driver
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
Uri uri = new
Uri("http://www.hubbardone.com/pdf/peer_to_peer_11-24-03.pdf");
HttpWebRequest httpRequest = null;
httpRequest = (HttpWebRequest)WebRequest.Create(uri);
httpRequest.Timeout = 500000;
httpRequest.KeepAlive = true;
HttpWebResponse httpResponse = null;
Stream responseStream = null;
try
{
httpResponse = (HttpWebResponse)httpRequest.GetResponse();
responseStream = httpResponse.GetResponseStream();
byte[] buffer = Driver.ReadFully(responseStream,1024);
Console.WriteLine("Finished");
}
catch(IOException ioex)
{
Console.WriteLine(ioex.Message);
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
finally
{
responseStream.Close();
httpResponse.Close();
}
}
public static byte[] ReadFully (Stream stream, int initialLength)
{
// If we've been passed an unhelpful initial length, just
// use 32K.
if (initialLength < 1)
{
initialLength = 32768;
}
byte[] buffer = new byte[initialLength];
int read=0;
int chunk;
while ( (chunk = stream.Read(buffer, read, buffer.Length-read)) > 0)
{
read += chunk;
// If we've reached the end of our buffer, check to see if there's
// any more information
if (read == buffer.Length)
{
int nextByte = stream.ReadByte();
// End of stream? If so, we're done
if (nextByte==-1)
{
return buffer;
}
// Nope. Resize the buffer, put in the byte we've just
// read, and continue
byte[] newBuffer = new byte[buffer.Length*2];
Array.Copy(buffer, newBuffer, buffer.Length);
newBuffer[read]=(byte)nextByte;
buffer = newBuffer;
read++;
}
}
// Buffer is now too big. Shrink it.
byte[] ret = new byte[read];
Array.Copy(buffer, ret, read);
return ret;
}
}
} Tag: Stop WindowsService Application Tag: 97313
Question on .NET Smart Client Application.
Group,
Have couple questions on .NET smart clients:
1. The application "is downloaded to the assembly download cache on the
client computer." What if the user "Delete all the temporary internet
files" from the browser. Will the assembly download cache will also be
cleaned up?
2. People is concerned about the security. But my concern is that to
much securinty that cause the application failed to downloaded to the
client's computer. I am make software to the public or unknown user. I
don't want any firewall or security settings block my application or
component.
Please advise.
Thanks in advance.
John Tag: Stop WindowsService Application Tag: 97312
Determining from a service if a user is logged on
This is a multi-part message in MIME format.
------=_NextPart_000_0016_01C565D5.150CD890
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
After reading some posts on the subject there seemed to be a consensus =
that when a user is interactively logged on to a machine, that there =
would be a windows station called "WinSta0" that would contain a desktop =
called "Default". When no user was logged on then the respective =
windows station and desktop would not be present.
I can properly enumerate the windows station and desktops and it reports =
correctly when I'm logged on. However, when the service is running and =
I log off it still reports that there is a WinSta0 station containing a =
desktop called "Default". I know this because the service writes its =
findings to the event log every 10 seconds. So after I log off and wait =
a few cycles and log back on, every entry says that I'm logged on.
So, my question is how can I determine from a service is a user is =
logged on to a workstation? Is this the correct track to pursue or is =
there another way? Thanks.
------=_NextPart_000_0016_01C565D5.150CD890
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.2900.2627" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>After reading some posts on the subject =
there=20
seemed to be a consensus that when a user is interactively logged on to =
a=20
machine, that there would be a windows station called "WinSta0" that =
would=20
contain a desktop called "Default". When no user was logged on =
then the=20
respective windows station and desktop would not be =
present.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I can properly enumerate the windows =
station and=20
desktops and it reports correctly when I'm logged on. However, =
when the=20
service is running and I log off it still reports that there is a =
WinSta0=20
station containing a desktop called "Default". I know this because =
the=20
service writes its findings to the event log every 10 seconds. So =
after I=20
log off and wait a few cycles and log back on, every entry says that I'm =
logged=20
on.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>So, my question is how can I determine =
from a=20
service is a user is logged on to a workstation? Is this the =
correct track=20
to pursue or is there another way? =
Thanks.</FONT></DIV></BODY></HTML>
------=_NextPart_000_0016_01C565D5.150CD890-- Tag: Stop WindowsService Application Tag: 97303
deployment of winform control for use in webpage
Hello,
I developped a winforms usercontrol that I need to use in a=
webpage=2E If i make an msi file that the users download=
seperately then it works=2E But I cannot figure out how to put it=
in a cab file so I can just put it in my object tag and they=
don't have to download it=2E (the installer is necessary for=
setting the codegroups and trusted sites)
Thanks a lot
--------------------------------
From: Ivan Porto Carrero
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>UKS46vJqJUCGdokgGR2wCQ=3D=3D</Id> Tag: Stop WindowsService Application Tag: 97298
MSCommLib
Hi,
Im developing an C# app and I am needing the MSCommLib component. Is it
correct that it comes with Visual Studio 6.0?
How can I get it? Is it possible do download.
Thanks
Julia Tag: Stop WindowsService Application Tag: 97288
problems with May VB Express/Avalon/Winfx SDK
Am I the only one encountering problems with the May VB Express? Aside from
the fact that Microsoft have again needlessly changed things, like registry
access which was fine the way it was and removed the visual basic
compatability namespace which I was actually using, ASIDE from that when I
create a new windows application project and run it, it crashes out with the
usual windows error dialogue and the option to report the error.
If I start the application without debugging it runs okay, but when i just
run the application (F5) it crashes, on a new application.
Should I uninstall and reinstall and try again?
Richard Tag: Stop WindowsService Application Tag: 97280
100 Labels
Hi!
I have 100 Labels and I need to put in text property a value but I don't
want to write 100 lines of code, like something like that:
for i=1 to 100
xrLabel(i).Text= i
next
How can do that?
--
Cumprimentos,
David de Passos
--------------------------------------------------------------
RCSOFT, Lda.
E-Mail: passos@rcsoft.pt
Móvel: +351 966931639
Telefone: +351 239708708
Fax: +351 239708701
Tel. Directo: +351 239708705 ext. 401 Tag: Stop WindowsService Application Tag: 97275
framework1 to framework2
we are willing to upgrade our server from framework1 to framework2 but we
afraid that it will damage our framework1 websites and applications. what are
the risks in upgrading to framework2? Tag: Stop WindowsService Application Tag: 97263
Help!! Problem instantiating WORD object using C#.NET
Hi experts,
I am trying to open the content of a WORD file from C#.NET which resides in
the REMOTE SERVER, however I get an error:
"System.Runtime.InteropServices.COMException: Server execution failed"
when declaring new Word.ApplicationClass().
string fileName = this.btnWorkOrder1.Value;
object readOnly = false;
object isVisible = false;
object saveChanges = false;
object missing = System.Reflection.Missing.Value;
object dynamic = 2;
//error here:
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
Word.Document oWordDoc = oWordApp.Documents.Open(ref file, ref missing, ref
readOnly, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing,
ref missing, ref missing, ref isVisible);
Does anybody know how to solve it? Please help!!!
Thanks alot!!!
Handy Mulia Tag: Stop WindowsService Application Tag: 97260
claiming memory from cleared items in listview control
I have a listview control on my Window form. New entries(items) are
continuously added to listview control. When the number of entries in
listview reaches 100, the items are cleared.
The problem is that even after clearing the items in listview, the memory
occupied by those items is not reclaimed and the memory usage of program
keeps increasing regularly (Task Manager).
Is there any way that I can claim memory used by items in listview control
immediately after I clear the items.
Thanks in advance Tag: Stop WindowsService Application Tag: 97257
screen shot of a page in c#
Dear sir/madam
iam working with an application in c#.
in which we have to handle with webpages with our appication
i have a small problem.
we have to screenshot a particular webpage through code,
ithere any way todo this,
Thank you for helping me
with regards
saish Tag: Stop WindowsService Application Tag: 97254
Band objects on task bar disappear and take other toolbars with th
Hi
I've got a toolbar I developed inheriting from a band object class found
here: http://www.codeproject.com/csharp/dotnetbandobjects.asp
This all works perfectly in Internet Explorer and it all works when I add it
to the taskbar, until I logout.
When I leave the Toolbar on the task bar and logoff and on again that and
any other toolbars, notably the quick launch have disappeared.
I downloaded the KBBar sample from
http://support.microsoft.com/default.aspx?scid=kb;en-us;821793 and changed
the BandObjectStyle to TaskbarToolBar and got the same behaviour, i.e.: It
work but disappeared taking quicklanch with it when I logged out.
I'm running Windows XP SP2 and that seems to be the culprit, I haven't tried
this without SP2 but posts on the Codeproject page sound like this is a SP2
specific problem.
Any help would be greatly appreciated.
Nick Coleman Tag: Stop WindowsService Application Tag: 97251
Socket File transfer
(Type your message here)
--------------------------------
From: ze paulo
hello ppl,
i'm trying for days now, to change this code to tranfer large files but, i dont wont to use ascii cause only send plain text and is not able to write non text files.
can somebody help me to change this code to send/receive byte streams whithout encoders so it can be used to transfer all kind of filles???
..
the Server Receiver
Private Sub StreamReceiver(ByVal ar As IAsyncResult)
Dim BytesRead As Integer
Dim strMessage As String
Try
SyncLock client.GetStream
BytesRead = client.GetStream.EndRead(ar)
End SyncLock
Dim outstream As New FileStream ("c:\TestFile.teste", FileMode.OpenOrCreate)
strMessage = Encoding.ASCII.GetChars(readBuffer, 0, BytesRead)
outstream.Seek(0, SeekOrigin.End)
Dim a() As Byte = Encoding.ASCII.GetBytes(strMessage)
Dim b As Byte
For Each b In a
outstream.WriteByte(b)
TBytesRead = TBytesRead + 1
Next
outstream.Close()
SyncLock client.GetStream
' Start a new asynchronous read into readBuffer.
client.GetStream.BeginRead(readBuffer, 0, READ_BUFFER_SIZE, AddressOf StreamReceiver, Nothing)
End SyncLock
Catch e As Exception
End Try
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''
the cliente side
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim buffer = 10024
Dim fTotalPcK As String
Dim fPcKSended As String
Dim fTotalSize As String
Dim fByteSended As String
Dim fs As FileStream = New FileStream(Txt1.Text, FileMode.Open, FileAccess.Read)
Dim abyt() As Byte
Dim br As BinaryReader = New BinaryReader(fs)
fTotalSize = fs.Length
fTotalPcK = (fTotalSize / buffer)
Dim FileName = fs.Name
Dim remain As Integer
Dim GetOut As Boolean = False
Dim i
For i = 0 To fTotalPcK
remain = fs.Length - fByteSended
If buffer > remain Then
abyt = br.ReadBytes(remain)
GetOut = True
Else
abyt = br.ReadBytes(buffer)
End If
SendToOne("localhost", Encoding.ASCII.GetString(abyt))
fByteSended = fByteSended + abyt.Length
If GetOut = True Then Exit For
Next
End Sub
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>aVo20YBLdEuwBllKK+Mc7g==</Id> Tag: Stop WindowsService Application Tag: 97211
beta2 XHTML compliance? is this necessary. OR STUPID...read UP MICROSOFT
I heard that beta 2 now makes ASP.NET xhtml compliant.
Can anyone shed some light on what this will change and it will break stuff
as converting HTML to XHTML pages DO break things. see,
http://www.alistapart.com/articles/betterliving/
I read on
http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/dnnetdep/html/netfxcompat.asp
It said they changed stuff like this
" Standards Compliance: The HTML rendering in ASP.NET was updated to be
XHTML 1.0 Transitional, which is standards compliant "
which is again another STUPID standard compliance mindnumb robot type of
thinking. Standard compliance is and will NEVER be important as getting it
to work on multiple browsers, period. What good is standards if the app
doesn't even work? How about a new standard? It's called getting it to work
instead of listening to some stupid committee who sits around all day in
conference talking to each other but know nothing of the real world in
getting things to actually work. Tag: Stop WindowsService Application Tag: 97202
Loading a referenced Framework 1.1 assembly from a Framework 2.0 Application
Hello,
We reference System.Messaging from our library that is a .Net Framework 1.1
assembly. This library is then referenced within our .Net Framework 2.0 Beta
2 application:
Expected references:
Application (2.0) ==> Custom Library (1.1) ==> System.Messaging (1.1)
Now we have the problem that when the application starts, the framework
loads our library and System.Messaging into its process, but
System.Messaging is the version from Framework 2.0 and not the originally
referenced from Framework 1.1. That causes our application to crash on
dispose.
Loaded references:
Application (2.0) ==> Custom Library (1.1) ==> System.Messaging (2.0)
Exception (thats the whole Exception):
System.NullReferenceException: Object reference not set to an instance of an
object.
at System.Messaging.MessageQueue.MQCacheableInfo.Dispose(Boolean
disposing)
at System.Messaging.MessageQueue.MQCacheableInfo.Finalize()
I have to say that we aren't able to move our library to Framework 2.0 (at
least not yet), and with Framework 1.1 and Framework 2.0 Beta 1 there were
no problems (maybe Microsoft changed the MessageQueue class from Beta 1 to
Beta 2).
Is there a way to force the Framework to load the originally referenced
version? And shouldn't that be the default behavior? In our opinion it makes
no sense that the framework loads by default the Framework 2.0 assembly even
Framework 1.1 is installed and our library references the assembly from
Framework 1.1. Shouldn't it load by default the originally referenced
assembly and only if not found the new one?
But thats a general problem, it has nothing todo with the System.Messaging;
the framework always loads assemblies in this manner. Is this a bug or by
design?
We can create a workaround for this by adding a binding policy for
System.Messaging but thats only a temporary solution, because we won't force
every application to load System.Messaging from Framework 1.1.
We use Framework v1.1.4322 and v2.0.50215.
Any help or suggestions are realy appreciated!
Regards,
Stefan Born
___________________________________
Software Engineer
bfa solutions ltd.
Switzerland Tag: Stop WindowsService Application Tag: 97200
Using threads correctly
Hi guys,
Whenever i need to use threads in my apps, i always
have the same problem of choosing the right kind of
threads to create.
I never know whether to create threads by using:
1) The Thread class, which may create a new os thread
2) A delegate, which uses a thread from the thread pool
3) The ThreadPool, which uses the thread pool as well
Can anyone please shed some light on this subject?
Thanks,
Avi Tag: Stop WindowsService Application Tag: 97198
Problem in COM Late-binding when exposing assembly to COM
Hi,
I am having a serious trouble when calling a .NET Assembly from a NON-CLR
app (VB6 app) through Com Wrapper. The object creation is fine; but when I
try to call its method it says "Object doesn't support this property or
method: 'MethodName'" .
If I add reference to the TLB and do with COM Early binding, it works. How
to get Late-binding client working ?
Here is the first method that works: Tlb file is added in references of VB
project
Dim obj As IMyAssembly
Set obj = CreateObject("My.Namespace.MyAssembly")
obj.DoSomething(); //working fine cheers!
Here is the second method that doesnt work: Tlb file is not added in
references of VB project
Dim obj As Object
Set obj = CreateObject("My.Namespace.MyAssembly")
obj.DoSomething(); // doesnt work :( says 'Object doesnt support this
property of method 'DoSomething''
I guess I need to supply the "default property" of object or "default
interface" of object but i dont know how to do it in .NET C#.
Any help on this will be appreciated.
Fahad Ashfaque Tag: Stop WindowsService Application Tag: 97197
DataSet/datatable Dispose
when dataset/datatable will be disposed ?
After calling Dispose(), when i access DataSet or DataTable, the object
exists.
Even after calling GC.Colect(), when i access them, the object and data
exists.
Can anyone explain why & how.
When i call dispose on dataset, will it automatically dispose all datatables
that it contains ?
thanks
niranjan Tag: Stop WindowsService Application Tag: 97193
Assembly key files - one per assembly or one per entire application?
This is a pretty minor issue but I'm wondering which makes more sense and
why:
Have one assembly key file per assembly or re-use the same key file for
every assembly in the application?
Does it really matter and if so, why? Tag: Stop WindowsService Application Tag: 97189
Release date and stability of .NET framework 2.0 (and VS)
Hi all,
I am planning a software project using C#. I expect the project to
take at least two months of design and coding, and another two months
of internal testing before it will be released.
After receiving the Visual Studio 2005 beta 2 DVD and getting some
experience with the new .NET framework, I am very pleased with the
new features, so I am now considering to target the .NET framework 2.0
for this project and work with the new VS beta.
One thing I could not easily find on the web is the expected "stable"
date for .NET framework 2.0. As we are aiming to finish the project
in 4 months, it is important for us to know if .NET 2.0 will be
available for end-user installation by then.
The same question I have about the release date of Visual Studio 2005.
We have a small team and use techniques like version control; this
would enable us to deal with most possible IDE disasters in VS. Also,
I haven't triggered any bugs yet. Would it be unadvisable to use the
.NET 2.0/VS 2005 Beta 2 combination for a serious project at this
time?
(A pointer to) some information about this would be appreciated a lot.
Thanks!
Walter Tag: Stop WindowsService Application Tag: 97181
vb express 2.0.50215.44 and march ctp avalon/indigo
Can I use the VB Express version 2.0.50215.44 (that's what vbsetup.exe
version is) with the March CTP of Avalon? I am currently running VB Express
Edition Beta 8.0.50110.28 and I want to upgrade it but also want to continue
Avalon development.
Thanks,
Richard Tag: Stop WindowsService Application Tag: 97176
.NET CLR 1.0.3705 difference cause MSIE downloaded problems?
Hello,
I am trying to resolve an issue where sending a file from a server to a
browser using PHP will give an error message in MSIE, but the file does
download from the server. The exact error is "There was an error opening
this download. This file cannot be found". So far, all I've seen is that
MSIE 6 using .NET CLR 1.0.3705 yields this message whereas our tests with
.NET CLR 1.1.4322 work as expected.
Is there a workaround for this other than forcing the user to update (and
will the update solve it, i.e., is this a known issue)? Are extra headers
needed with 1.0.3705 to send files for downloading with the proper
disposition?
Any other links to solutions or suggsts welcome!
tia Tag: Stop WindowsService Application Tag: 97173
Probelm with Process and shortcut
Hello
I directly go to the problem, I create a Process, I set the Filename to the
full path and filename of a shortcut file (.lnk) and then I start my process,
like this :
Process p;
p.StartInfo.FileName = "path\\of\\my\\shortcut\\file.lnk";
p.Start();
My problem is that I always get a Win32Exception, with this message :
"The specified executable is not a valid Win32 application"
My shortcut is valid, it links to a PDF file and when I double-click on my
shortcut, I get my PDF document open in Acrobat, properly
Thank you in advance for any help Tag: Stop WindowsService Application Tag: 97168
Terminial Server Help Needed!!!!
Sorry for posting this again, but don't know where to post it so hopefully
someone here will know more.
Anyone knows how to find out how many instances of Terminal Server is
running? If I have a Terminal server that has 5 licenses and 4 user's logon
I want to know how to find out that 4 users are logged on. I'd like to do
this all through code. Right now I am using VB.Net and trying to keep track
of how many instances of my application is running.
However, that does not work if the users logon with different usernames.
Example: John logs on to the Terminal server with the user name John and
runs HelloWorld. Then Mary logs on to the Terminal server with the user
name Mary and runs Hello world. Normally you can check the Process ID of a
running exe and see if it is already up before letting the program run
again. This does not work when Mary logs on with her own username to the
terminal server. Now if Mary logs on with the username John then try to run
the application then the process ID code will tell her that another process
is running.
So I have two questions, how do I access details about a Terminal server
through VB.Net? Is there something built in the framework of .Net for this?
If there is something can that help me find the number of instance and what
different user instances are currently running?
Help would be greatly appreciated!!!!!!
Thanks
Clyde Tag: Stop WindowsService Application Tag: 97159
Implementing enumerations that could change
Hi Everyone,
I have been designing a class that encapsulates the functionality of
a "Phone Number". I find that I am getting stuck on how to implement
the "type" of phone number the class represents. I started off by using
an enumeration such as..
Enum PhoneType
{
Work = 1,
Home = 2,
Mobile = 3
}
But as I thought more about it I wanted to be able to add more values
to the enumeration as the need arose. It would be best if I could store
the values of the enumeration in a database table. The problem is this:
If I am thinking of changing the members of the enum, is an enumeration
the best choice in the first place? I could use a class to represent
the "Type" of phone but it almost seems like overkill to use a class
just to enable the addition of future members of the "Phone Number
Type". Can anyone suggest a better way? Thanks.
-D Tag: Stop WindowsService Application Tag: 97158
.Net Famework crash
Hi
We have a Win2000 Server with asp.net 1.1 (all patches and SP installed)
Our asp.net application worked fine for 3 mounth. Since we have more traffic
the framework crashes sometimes (mostly once a week and sometimes twice
an hour).
The Web-Logs has no information about this. The eventlog says:
.NET Runtime version 1.1.4322.2032- Setup Error: Failed to load resources
from resource file
Please check your Setup.
And directly after that: aspnet_wp.exe was stopped unexpected (or similar)
Can someone help?
Thanks
Gerry Tag: Stop WindowsService Application Tag: 97153
How come Image.FromFile() member function is not avaiable?
Hi,
Refering to the title, I am using Visual Studio .NET 2003, WInXP Pro SP2 to
develop C# on PocketPC.
To me surprise, I cannot locate the member function, FromFile( ) from the
System.Drawing.Image class.
My VS only show 8 members functions from the class;
(1) Dispose
(2) Equal
(3) GetHashCode
(4) GetType
(5) Height
(6) Size
(7) ToString
(8) Width
There are just no FromFile( ), thus I could not load a simple image into my
picture box.
Is it my .NET framework is not configurated or installed correctly? How am I
going to know that?
Please advise. I am really confuss. Tag: Stop WindowsService Application Tag: 97151
Getting initiating class name in its base class's shared property
Hello,
Is there any way of getting currently instantiated class name from a parent
class's shared readonly property? I would need to know which actual class
(that was derieved from the class containing the shared property) is trying
to get the shared property value. It would be something like this:
Public Class BaseClass
Public Shared ReadOnly Property PageConfig() As PageConfiguration
Get
Return PageConfigurator.GetConfig( [here i would like a derieved
class's name, if called through that] )
End Get
End Property
End Class
Public Class DerievedClass
Inherits BaseClass
Public Sub SomeMethod()
PageTitle = Me.PageConfig.Title
End Sub
End Class
Why does it need to be Shared? I need to call it also for the derieved class
from any other class that has nothing to do with the two above without
creating an instance of derieved class, like:
Public Class AnotherClass
Public Sub SomeMethod
Dim TargetUrl As String = DerievedClass.PageConfig.Url
End Sub
End Class
Am I missing something? Is this possible at all? This is so trivially used
in my projects and there are so many derieving classes that I would like to
accomplish this task without needing to code anything in derieving classes.
I've tried something with gettype and reflection without success.
Any help appriciated,
Pasi Häkkinen Tag: Stop WindowsService Application Tag: 97150
/3GB
Hello,
I have the problem with allocation large array in C#. My array is largest
than 1GB of RAM. My computer has 1,5GB of RAM memory and windows is set to
use 2GB of virtual memory.
In c++ exist /LARGEADRESSAWARE switch, but in c# is isn't.
Can you help my. Tag: Stop WindowsService Application Tag: 97143
Visual Studio
We are going to be installing VS developer on a computer, a few months from
now we are getting VS architect. We are going to want to uninstall VS
developer from the first machine and install it on a second, and install VS
architect on the first.
I have heard their may be issues with installing VS developer on the second
computer due to copy protection (we are only going to have one copy installed
at a time)
Will this be an issue? And if so how do you deal with it (legally)?
Thanks for the help. Tag: Stop WindowsService Application Tag: 97142
Privilidges
I believe the following applies to privilidges - but not sure how to correct
on windows XP SP2 OS.
For some reason cannot open any file on local machine using window.open(...)
command. Sample syntax : window.open("C:\\Downloads\\File.txt", "_blank").
This works on another development machine - Windows 2000 OS - with respective
privilidges. Just won't open here - no error message - nothing. I've set
permissions similiar to to Windows 2000 platform, ASPNET account for full
control - but still won't open from laptop. Any suggestions?
Tnks. Tag: Stop WindowsService Application Tag: 97137
ASP.NET Impersonation Problem
Now this is a classic. The impersonation fails for CASE I but doesn't fail
for CASE II or III.
Case I:
Client Side Code
-----------------
System.Net.NetworkCredential credential = new
System.Net.NetworkCredential("myUserName", "myPassword", "myDomain");
ServiceA a = new ServiceA();
a.Credentials = credential;
a.SomeMethod();
Server Side Code
------------------
Web.config
-----------
<authentication mode="Windows" />
<identity impersonate="true" />
ServiceA
---------
[WebMethod]
public void SomeMethod() {
// Write to share drive code (the share drive has myUserName in ACL
list, myUserName should be able to write to it)
// But it fails
}
Case II:
Everything being same if I change only the Web.config as follows, it works:
<authentication mode="Windows" />
<identity impersonate="true" userName="myDomain\myUserName"
password="myPassword" />
Case III:
Web.config
------------
<authentication mode="Windows" />
<!-- No impersonation -->
ServiceA
---------
[WebMethod]
public void SomeMethod() {
Impersonate i = new Impersonate();
i.StartImpersonate();
// Write to share drive code (the share drive has myUserName in ACL
list, myUserName should be able to write to it)
// This time it works
i.UndoImpersonate();
}
public class Impersonate {
// Usual code using the following
[DllImport("advapi32.dll")]
public static extern int LogonUserA(...);
}
I've tried the following for CASE I as suggested in
http://support.microsoft.com/default.aspx?scid=KB;en-us;q306158. But nothing
works.
a) Changing the "userName" attribute from "machine" to "system" in
"processModel" node in machine.config
b) Including ASPNET user in following Group Policy:
\Local Computer Policy\Computer Configuration\Windows Settings\Local
Policies\User Rights Assignment\"Act as part of the operating system"
Infrastructure: Windows XP Pro (Service Pack 1); .NET Frmaework 1.0 (No
service pack)
Our corporate policy strongly favors doing things as in CASE I. How can I
make it work?
Thanks,
Ram Tag: Stop WindowsService Application Tag: 97132
Spawning a process from a service
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C562D5.9856D230
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
There is an application (which I don't have access to modify) that =
launches a desktop toolbar for the user that needs to stay active =
throughout their session. I've been tasked with writing a service (in =
c#) that checks whether this process is running and if not, then =
relaunch it. In taking a first try at it I've come across a couple =
issues:
a.. How do I detect whether there is anyone logged on or not? If no =
one is logged on there's no use checking whether this process is active
b.. How do I launch the app in the context of the currently logged on =
user? Obviously, I won't have access to their password so I just need =
to be able to spawn a process in the context of the active user's =
session on the system
Any help would be greatly appreciated. Thanks.
Marianne
------=_NextPart_000_000A_01C562D5.9856D230
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.2900.2627" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>There is an application (which I don't =
have access=20
to modify) that launches a desktop toolbar for the user that needs to =
stay=20
active throughout their session. I've been tasked with writing a =
service=20
(in c#) that checks whether this process is running and if not, then =
relaunch=20
it. In taking a first try at it I've come across a couple=20
issues:</FONT></DIV>
<UL>
<LI><FONT face=3DArial size=3D2>How do I detect whether there is =
anyone logged on=20
or not? If no one is logged on there's no use checking whether =
this=20
process is active</FONT></LI>
<LI><FONT face=3DArial size=3D2>How do I launch the app in the context =
of the=20
currently logged on user? Obviously, I won't have access to =
their=20
password so I just need to be able to spawn a process in the context =
of the=20
active user's session on the system</FONT></LI></UL>
<P><FONT face=3DArial size=3D2>Any help would be greatly =
appreciated. =20
Thanks.</FONT></P>
<P><FONT face=3DArial size=3D2>Marianne</FONT></P></BODY></HTML>
------=_NextPart_000_000A_01C562D5.9856D230-- Tag: Stop WindowsService Application Tag: 97131
Pop-Up menu in FrontPage
In DreamWeaver MX (or 2004) i could add a popup menu to a hotspot on an
image, using "behaviors >> show pop up menu". How can i do the same thing in
FP 2003? is there sth like it in FP at all? And if not, then is there an
add-in for it ?
Thanks for any help. Tag: Stop WindowsService Application Tag: 97127
DateTimePicker
I've read many web pages and messages in newsgroups talking about this
issue, but I haven't found a solution to my problem.
I need to have a datetimepicker control bound to a dataset (an Access file).
The problem comes out when I want to add a new record: the user needs to
pick a date from the datetimepicker control, otherwise a null value (and not
the default value / text of the control) is written in the database.
What I need is some way to make my program understand that it needs to write
dtp's text / value into the database even if the user doesn't touch that
control.
Any solution to this?
Thanks in advance,
G Tag: Stop WindowsService Application Tag: 97117
Is it possible to update resource files programmatically?
I have blocks of text stored in resource files and it would be great to
allow the client to be able to update those files themselves..
any thoughts.. pointer.. tutorials ??
tia
Dave Tag: Stop WindowsService Application Tag: 97113
installtion problem
(Type your message here)
I created installtion kit using VB.NET. Database and organization details are installed by using installation class and this value is writing into the registry at the installation time.
When i installed i faced the following problem.
If i give the organization name with sapce, eg: "Micro soft" it throws the error as "File not found exception or one of the dependency is missing"
i accept the value by using the Textboxes in the user interface editor and checking this value by using the custome action editor in the vb.net environment.
Finally, read this value and pass the function that can be in the installation class.
please go through it and reply favourly.
Thanking you,
--------------------------------
From: deenadayalan P
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>OjQF5z5t7UG8cAIv+VgO3g==</Id> Tag: Stop WindowsService Application Tag: 97110
Hi,
How can I stop my Windows Service Application. I looked for something like
me.close but found nothing equivalent.