Calling from default AppDomain (native code) into another AppDomain (managed code), hosted by ASP.NET
Hello,
We have a situation where a managed C++ assembly links with native C++ dll.
There is a callback mechanism which calls back into the managed code
asynchronously. Since native classes cannot hold onto a managed reference,
we need to have a managed static member which we access during the callback
and then get into the managed code.
This works great in a console or WinForm app. But in ASP.NET it doesn't. The
reason is that each web site is loaded into its own AppDomain.
After some debugging we found out that the managed static is set on
AppDomain 2, but the callback happens on AppDomain 1 (the default domain).
When the callback code tries to access the managed static - it is undefined.
We found a way to do a call into a different AppDomain, but only when you
already have a reference to that AppDomain and we don't - there doesn't seem
to be a way to enumerate AppDomains in a process.
Has anybody else run into this?
Is there a way to have ASP.NET (or the CLR) to not load the native code into
the neutral domain, instead load it into each AppDomain? Tag: SharpPDF Tag: 125930
how to cache a datatable every X time
i have a web app where i have a Singleton holding a bunch of
datasets(Instances not classes).
one dataset have some dynamic data that i want to update once a
while,that dataset is accessed by other part of the app
.
i saw that the DataTable is multi-reader,one-writer,i tried using a
timer but some times it made the all site to stuck for a few seconds
and it crashed my testing server.
then i tried to make a aspx web page that cache the DataTable and a
windows service that call it every 5 minutes,but using that way i get a
weird thing controls that bind to that datatable such as repeater
doesn`t show the data from the datatable all time,sometime it shows and
sometimes it doesn`t show it( i only update three columns of that
datatable and that three columns are the ones that doesn`t always show
in the controls the other columns work just fine) this problem i have
with both ways.
when i cache part of that datatable(those 3 columns) i execute a Stored
procedure and use a SqlDataReader to read the data and update the
datatable according to the new data(i don`t update all the table just
three columns in every row).
my big question is:
what is the best way to cache the DataTable(part of it) from the
Database every X time?
i can`t use just a windows service as the DataTable live only in the
application process. Tag: SharpPDF Tag: 125926
Problem about socket.poll
I have writen the following souce code :
m_Socket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
m_Socket.Blocking = false;
try
{
m_Socket.Connect(ipEndPoint);
}
catch (SocketException e)
{
int timePace = 500000;
try
{
bool retCode = m_Socket.Poll(timePace,
SelectMode.SelectWrite); //Step1 , check the server status.
m_Context.IsLastPollSuccess = retCode;
//System.Console.WriteLine( retCode );
if (retCode == true)
{
m_Context.LastSocketErrorCode = 0;
m_Context.IsSocketConnected = true;
}
else
{
throw new
MyAppException(MyAppExceptionRes.GetString(MyAppExceptionRes.MyAppException_16_SystemCallError,
new object[] { "Socket.Poll", e.ErrorCode
}));
//Step2 poll method return false, throw an
general error message.
}
// set socket option
//......
}
catch (SocketException e1)
{ //Step3 according the errorcode to get the error
message.
if (e1.ErrorCode == 10049 || e1.ErrorCode == 10051 )
// WSAEADDRNOTAVAIL=10049 , WSAENETUNREACH=10051
{
throw new
MyAppException(MyAppExceptionRes.GetString(MyAppExceptionRes.MyAppException_17_HostAddressErrorInHostFile));
}
else if (e1.ErrorCode == 10060) // WSAETIMEDOUT
=10060
{
throw new
MyAppException(MyAppExceptionRes.GetString(MyAppExceptionRes.MyAppException_14_CannotCommunicateWithServer));
}
else if (e1.ErrorCode == 10048) // WSAEADDRINUSE
=10048
{
throw new
MyAppException(MyAppExceptionRes.GetString(MyAppExceptionRes.MyAppException_18_ServerHasBeenUsedAddress));
}
else if (e1.ErrorCode == 10061) //
WSAECONNREFUSED=10061
{
throw new
MyAppException(MyAppExceptionRes.GetString(MyAppExceptionRes.MyAppException_19_ServerRefusedConnection));
}
else if (e1.ErrorCode == 10050) // WSAENETDOWN
=10050
{
throw new
MyAppException(MyAppExceptionRes.GetString(MyAppExceptionRes.MyAppException_12_GeneralNetworkError));
}
else if (e1.ErrorCode == 10055) // WSAENOBUFS =10055
{
throw new
MyAppException(MyAppExceptionRes.GetString(MyAppExceptionRes.MyAppException_13_InsufficientMemory));
}
else
{
throw new
MyAppException(MyAppExceptionRes.GetString(MyAppExceptionRes.MyAppException_16_SystemCallError,
new object[] { "Socket.Poll", e1.ErrorCode
}));
}
}
accor ding to the "user-fixable errors", the url is :
http://www.sockets.com/a_c2.htm#UserFixableErrors
I am try to use the socket.poll method to check the server status after
the socket.connect method, and it will throw out exception with a
specified errormessage according to the server status.
but, the program has never arrived at the step 3.
The poll method always return false without exception , even if I input
one error IP and Port, i draw out the network.
I do not know what's wrong with my source code, are there some bugs in
my code?
In addition, who can tell me when the poll method will throw exception?
would you please to tell me how to create such a condition to invoke
the exception?
anyway, thanks to all of you . Tag: SharpPDF Tag: 125925
Background Color of MDI Client Area
Hi
What is the way to change the colour of the background in the client area of
a MDI form Window.
TIA
Barry Tag: SharpPDF Tag: 125921
[App-name] has encountered a problem and needs to close. We...
Hi
Under what circumstances do this dialog box apper in a .Net 2.0 application?
I have never noticed this dialog box before I installed the KB924895 fix for
.Net framework 2.0. Tag: SharpPDF Tag: 125917
DataGridView and DateTimePicker on same form cause flickering VS2005
Hi
Has anyone experienced this problem? To create the problem, simply
place a DateTimePicker and DataGridView on a form. Add some columns to
the DataGridView in designer mode and then run. It is easier to see
the flicker if you add a few rows to the grid(just add a few rows by
clicking the add row) then go to the DateTimePicker and click the down
arrow and change the date. Usually 3 or 4 seconds after the calendar
disappears, the DataGridView will flicker (sometimes several times)
with another grid appearing over the existing one.
I've tried enabling doublebuffering and the like but can't prevent the
flicker. The flicker only happens when a DateTimePicker is used, for
instance a combo box does not cause the flicker. Anyone having a
workaround?
I'm using VS2005 with SP1 on WindowsXP.
Thanks
Allan Tag: SharpPDF Tag: 125912
C# - Printing a form with scrollable controls
HI,
I have an app that has a form with scrollable controls. So, I cannot
make a bitmap from the printscreen and print it since all the content
and controls are not visible at the same time.
Is there a way in C# to print such a form - printing the whole content?
Thanks,
Avanti Tag: SharpPDF Tag: 125911
ClickOnce - .chm file
Hi,
I have a ClickOnce app that has a .chm help file. The .chm file is set
as - Build Action: Content and Copy to Output Directory: Copy Always.
When I publish the app, it is not available. I have already tried the
code at:
http://groups.google.com/group/microsoft.public.vsnet.general/browse_thread/thread/ffec7d894fbe88f7/daa68388e3b3c5b2?lnk=st&q=ClickOnce+.chm+string+exeFileName+%3D+Application.ExecutablePath%3B&rnum=3&hl=en#daa68388e3b3c5b2
It did not work. Any ideas?
Thanks,
Avanti Tag: SharpPDF Tag: 125910
Accessing file properties
I've been searching the file classes for a way to read and modify the file
properties you see when you right click a file, under the summary tab. It
has fields like title, subject, category and so on.
Thanks for any tips.
BK Tag: SharpPDF Tag: 125900
Console app & Base path
Hi,
I have a console app. I have to search for files in the directory from which
my application is run. Here's an example :
c:\MyApp>MyApp.exe param1 param2
The base path is C:\MyApp... but if I do the following :
c:\MyApp\SubDir>..\MyApp.exe param1 param2
The base path should be C:\MyApp\Subdir... Is there a way to get this
value? I tried AppDomain.CurrentDomain.BaseDirectory, but it always returns
c:\MyApp...
Please help... ;)
ThunderMusic Tag: SharpPDF Tag: 125890
PDF Generator
I'm looking into working with an opensource PDF Generator or
Converter.(ItextSharp etc...)
However, in my research, none of these seem to give total control over
placement of text. I need to place text in specific areas/coordinates.
Does anyone have experience with a pdf generator that allows this? Tag: SharpPDF Tag: 125888
Chuncked upload via socket
Using: .Net Compact Framework 2, Windows Mobile 5 (Pocket PC)
I'm trying to upload a large binary file in chuncks over a socket (as a
multipart mime message). This is how I'm trying to accomplish this, but
it somehow doesn't work:
================================================
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
IPAddress ipa = Dns.GetHostEntry("www.blablabla.com").AddressList[0];
IPEndPoint ipe = new IPEndPoint(ipa, 80);
s.Connect(ipe);
FileStream tmpFileStream = new FileStream(tmpUploadFileName,
FileMode.Open, FileAccess.Read);
StringBuilder postString = new StringBuilder("POST /servlet
HTTP/1.1\r\n");
postString.Append("Host: www.blablabla.com\r\n");
postString.Append("User-Agent: Windows Mobile 5 PPC\r\n");
postString.Append("Accept: */*;q=0.5\r\n");
postString.Append("Keep-Alive: 300\r\n");
postString.Append("Connection: keep-alive\r\n");
postString.Append("Content-Type: multipart/form-data;
boundary=----1234----\r\n");
postString.Append("Content-Length: " + tmpFileStream.Length + "\r\n");
postString.Append("\r\n");
postString.Append("\r\n");
s.Send(Encoding.UTF8.GetBytes(postString.ToString()));
int numRead = 1;
int chunkSize = 1024;
byte[] bytes = new byte[chunkSize];
while ((numRead = tmpFileStream.Read(bytes, 0, chunkSize)) > 0) {
try {
s.Send(bytes, numRead, SocketFlags.None);
} catch (Exception e) {
}
}
s.Shutdown(SocketShutdown.Send);
if (s.Connected) {
s.Close();
}
================================================
If I read in the complete file and upload it at once everything goes
fine, so it's likely not a problem with the format of the multipart
mime message.
I find the documentation on FileStream.Read() a bit vague, saying that
the 'offset' parameter is the offset in 'aray', which is the
destination array. It says 'offset: The byte offset in array at which
to begin reading. ' (where 'array' is the name of the destination array
parameter). Reading from the destination array? Tag: SharpPDF Tag: 125881
how can i create multiple subdomain into domain
Hi:-I have my own webspace www.domain.com. When any new user register
on to my site, a new url name www.subdomain.domain.com or
www.domain.subdomain.com should be provided to it.
I want to provide sub-domain name in the above form and then they will
be stored in the MS-SQL database with relation to ASP.net Please help
me with this. Tag: SharpPDF Tag: 125874
.net framework updates
i have .net framework 1.1, 1.1 hotfix and 2.0 can i unistall the two 1.1's
and if i download 3.0 can i take off 2.0 also? Tag: SharpPDF Tag: 125869
WebRequest timeout changed declaratively
Hi all,
We have some performance issues on a .NET 2.0 app. However we cannot modify
it, we don't have the sources.
Reading the logs, the error is a timeout happening in some Web Service call.
With the sources, it would be easy (?!), would have just changed
WebRequest.Timout to a bigger value, but we don't have sources.
Is there a way to change the default value, which is 100 seconds,
declaratively (in web.config, machine.config... etc.) or even somewhere else
like in the registry? Or is it hard coded in the framework?
I have been struggling on this, but haven't found a lead...
Thanks,
Cédric Tag: SharpPDF Tag: 125866
Storing/saving sessions on SQL Server
Hi all,
I am trying to work with SessionState mode="SQLServer" and have run the
installSQL Script and the good stuff...
While running the program I get
"SQL Server does not exist or access denied. "error
if I have either
sqlConnectionString="data source=localhost;user
id=someUname;password=somePwd"
or sqlConnectionString="data source=127.0.0.1;user
id=someUname;password=somePwd"
setting
and
"Cannot open database requested in login 'ASPState'. Login fails. Login
failed for user 'someUname'. " error
if i use this
sqlConnectionString="data source=(local);user id=someUname;password=somePwd"
setting
Please advice,
Stephen Tag: SharpPDF Tag: 125863
WIC Installer Error
Hi,
dotnetfx3.exe setup fails please help. I included dd_dotnetfx3error.txt &
dd_WIC.txt logs below.
I am logged in as user in 'domain admins' group and Cryptographic service is
running on this computer.
TIA,
Josh
The error log reads:
[01/06/07,10:16:34] RGB Rast: [2] Error: Installation failed for component
RGB Rast. MSI returned error code 1618
[01/06/07,10:16:40] WapUI: [2] DepCheck indicates RGB Rast is not installed.
[01/06/07,10:16:40] WapUI: [2] DepCheck indicates Microsoft .NET Framework
3.0 was not attempted to be installed.
[01/06/07,10:19:23] RGB Rast: [2] Error: Installation failed for component
RGB Rast. MSI returned error code 1618
[01/06/07,10:19:28] WapUI: [2] DepCheck indicates RGB Rast is not installed.
[01/06/07,10:19:28] WapUI: [2] DepCheck indicates Microsoft .NET Framework
3.0 was not attempted to be installed.
[01/06/07,10:33:14] WIC Installer: [2] Error code 1603 for this component
means "Fatal error during installation.
"
[01/06/07,10:33:14] WIC Installer: [2] Setup Failed on component WIC
Installer
[01/06/07,10:33:16] WapUI: [2] DepCheck indicates WIC Installer is not
installed.
[01/06/07,10:33:16] WapUI: [2] DepCheck indicates Microsoft .NET Framework
3.0 was not attempted to be installed.
[01/07/07,23:16:01] WIC Installer: [2] Error code 1603 for this component
means "Fatal error during installation.
"
[01/07/07,23:16:01] WIC Installer: [2] Setup Failed on component WIC
Installer
[01/07/07,23:16:04] WapUI: [2] DepCheck indicates WIC Installer is not
installed.
[01/07/07,23:16:04] WapUI: [2] DepCheck indicates Microsoft .NET Framework
3.0 was not attempted to be installed.
[01/07/07,23:29:17] WIC Installer: [2] Error code 1603 for this component
means "Fatal error during installation.
"
[01/07/07,23:29:17] WIC Installer: [2] Setup Failed on component WIC
Installer
[01/07/07,23:29:19] WapUI: [2] DepCheck indicates WIC Installer is not
installed.
[01/08/07,00:02:35] WIC Installer: [2] Error code 1603 for this component
means "Fatal error during installation.
"
[01/08/07,00:02:35] WIC Installer: [2] Setup Failed on component WIC
Installer
[01/08/07,00:02:37] WapUI: [2] DepCheck indicates WIC Installer is not
installed.
The dd_WIC.txt file reads:
0.125:
================================================================================
0.125: 2007/01/07 23:29:14.750 (local)
0.125: d:\c74bfeb855d3355c7a610db1fceea9e8\update\update.exe (version
6.3.4.0)
0.141: Hotfix started with following command line: /quiet /norestart
/log:C:\DOCUME~1\jbooker\LOCALS~1\Temp\1\dd_WIC.txt
0.141: In Function GetBuildType, line 1170, RegQueryValueEx failed with
error 0x2
0.156: C:\WINDOWS\system32\WindowsCodecs.dll is Not Present
0.156: First Condition in Test.WindowsCodecsVer.Section Succeeded
0.156: Condition succeeded for section Test.WindowsCodecsVer.Section in Line
1 of PreRequisite
0.156: C:\WINDOWS\system32\WindowsCodecsExt.dll is Not Present
0.156: First Condition in Test.WindowsCodecsExtVer.Section Succeeded
0.156: Condition succeeded for section Test.WindowsCodecsExtVer.Section in
Line 2 of PreRequisite
0.156: C:\WINDOWS\system32\WMPhoto.dll is Not Present
0.156: First Condition in Test.WMPhotoVer.Section Succeeded
0.156: Condition succeeded for section Test.WMPhotoVer.Section in Line 3 of
PreRequisite
0.156: C:\WINDOWS\system32\PhotoMetadataHandler.dll is Not Present
0.156: First Condition in Test.PhotoMetadataHandlerVer.Section Succeeded
0.156: Condition succeeded for section Test.PhotoMetadataHandlerVer.Section
in Line 4 of PreRequisite
2.141: InstallInfCatalogFile: Installing
d:\c74bfeb855d3355c7a610db1fceea9e8\update\WIC.cat as _000000_.cat...
2.156: VerifyTargetFileSize: Unable to verify size as Source = NULL for file
c:\windows\_000000_.cat
2.250: InstallCatalogFile: InstallCatalog failed for
c:\windows\_000000_.cat; error=0xfffffc0d.
2.250: InstallInfCatalogFile: Installation failed; error=0x00000002.
2.250: IsInfFileTrusted: ValidateSingleFileSignature Failed:
STR_FAILED_INF_INTEGRITY
2.250: WIC Setup encountered an error: Setup could not verify the integrity
of the file Update.inf. Make sure the Cryptographic service is running on
this computer.
2.281: DeleteCatalogFile _000000_.cat failed with ERROR -1011
2.297: CleanupTrustedInfFile: GetFileAttributes for
C:\WINDOWS\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\oem11.cat
failed: 0x2
2.297: Setup could not verify the integrity of the file Update.inf. Make
sure the Cryptographic service is running on this computer.
2.297: Update.exe extended error code = 0xf0da
2.297: Update.exe return code was masked to 0x643 for MSI custom action
compliance. Tag: SharpPDF Tag: 125861
Control Design Time Updating
I have created a user control that contains one a tree object on it. I
want the tree objects size and position to be the same as the control
that the developer drops on his painter. How do I accomplish this so
VS will pain the boundaries of my tree control in design mode as the
same size of the parent control object he placed on a form.
Thanks all for your help.
Andy Tag: SharpPDF Tag: 125859
StrataFrame Application Framework
Hi,
has anybody tried to use the StrataFrame Application Framework and can
comment about it?
http://www.strataframe.net
regards, Robert Tag: SharpPDF Tag: 125856
State Management Question
Hi all,
I want to try State Management using SQL-Backed Session State and am trying
to locate aspnet_regsql.exe on my computer but I cannot find it in
C:\<windows>\microsoft.net\framework\<version> or my computer
I have been using VS 2003, have I missed installing some component? please
advice.
Thanks,
Stephen Tag: SharpPDF Tag: 125853
SQL Server Problem.
Hi. I hope someone smarter than me could help me with this strange
problem.
I created a system which needs to connect to a SQL database. Initially
the programs were designed in Visual Studios 2003 .Net, and the
database was SQL Server 2000. After a long wait, I finally got the go
ahead to install the software for the client, and I managed to get the
PDA software to connect with the database. But after a while, I
installed the SQL Server 2005 and the Management Studio for the Sql
Server. But this is now where my problem arises. I tried connecting to
the database again with the PDA, but it now says "Index 0: Server does
not exist or access denied" and I have checked the same settings with
the server application, but the application on the server logs into the
database. Even if I try removing everything, uninstalling the system,
wiping the database, and resetting the PDA, I still end up with that
problem.
This now occured after I installed SQL Server 2005, and I can't figure
out why this problen now surfaces, and even if I remove SQL Server
2005, it still says "Index 0: Server does not exist or access denied"
on the PDA.
Here is my connection string I pull out of a File I wrote:
mSession.CurrentConnection.ConnectionString = "Data Source=test;Initial
Catalog=DB;User Id=sa;Password=sa@123";
If I run this from my work computer, everything runs fine, but as soon
as I switch to the test computer, that error keeps on popping up. Any
way I can completely uninstall the WHOLE sql server from the test
computer? Every single file and folder? I already removed it by using
Control Panel Add Remove Programs, yet I still have this problem.
Does anyone have a solution without needing to reformat a server?
All and any help is greatly thankful. Tag: SharpPDF Tag: 125852
Control (textbox) update from thread invisible
Hello! I'm trying to update a text box from a thread. It works fine
until my thread is created from a seperate class. To illustrate, here's
my form code (the textbox is txtOutput.text) and for the class:
(This all works fine if the "Count" class is declared simply as a
function within form1 - but outside of that the control updates are
invisible!
Imports System.Threading
Delegate Sub SetTextCallback(ByVal [text] As String)
Public Class Form1
Dim tClass As count
Dim t As Thread
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnStart.Click
tClass = New count
t = New Thread(AddressOf tClass.bProcess)
t.Start()
While t.IsAlive
Thread.Sleep(20)
End While
End Sub
Public Sub SetText(ByVal [text] As String)
' InvokeRequired required compares the thread ID of the
' calling thread to the thread ID of the creating thread.
' If these threads are different, it returns true.
If Me.txtOutput.InvokeRequired Then
Dim d As New SetTextCallback(AddressOf SetText)
Me.Invoke(d, New Object() {[text]})
Else
Me.txtOutput.Text = [text] & txtOutput.Text
Me.txtOutput.Refresh()
End If
End Sub
Private Sub btnAbort_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnAbort.Click
t.Abort()
End Sub
End Class
And here's the class for the count class:
Public Class count
Inherits Form1
Public i As Integer
Sub New()
i = 0
End Sub
Sub bProcess()
For i = 1 To 1000
'If i Mod 25 = 0 Then
' SetText(i.ToString & " " & ControlChars.CrLf)
' 'txtOutput.Text = i.ToString & " " & ControlChars.CrLf
'Else
SetText(i.ToString & " ")
'End If
Next
End Sub
End Class Tag: SharpPDF Tag: 125850
External Program like child in MDI Parent
I want to create, in cSharp, an MDI application parent and to call in
it
another program (i.e. notepad) like his child.
I want to create a proccess with CreateProcess() and call it like
child in my application
Do you think is possible? Tag: SharpPDF Tag: 125849
How do I grant permissions to my .NET 2.0 program in Windows 2003?
I created an application under C# that runs as a Windows Service. On
my workstation the application runs fine. On my Windows 2003 server,
it doesn't. I used the .NET framework 2.0 InstallUtil to install my
Windows Service. The service appears in the service list, and if I try
to start it, it fires up and I can see in the Event Log that the
application started. However, the first thing my application does is
write an event to the Windows event log to check in, and that event
doesn't appear. The second thing the application will do is insert a
record in a SQL server database, that doesn't happen either.
I used to compile and run this on my Windows 2003 server just fine for
framework v1.1. With 1.1 I would just use the administrative tools in
the control panel to assign a trust level to my application. However,
it seems to have changed under 2.0 and now I can't figure out how to
give my application the necessary permissions to write to the event log
or open a network connection. Are there any articles that will walk a
person through how to do this? I'm searching MSDN and Google to no
avail...
Thank you!
David Tag: SharpPDF Tag: 125848
Debugging managed code under windows 98
Hi
I have this application that bevahes strange under some circumstances
when running under Windows 98.
I'm using v1.1 of the framework and my app is a standard Windows Forms
app.
Is there a way/tool to debug my app under windows 98?
If so, what is the best way?
Any idea higly appreciated.
Thanks.
Adi. Tag: SharpPDF Tag: 125846
Still getting 'The thread <'No Name'> ... has exited' after setting
After executing the following code in .NET 2.0:
Thread t = new Thread(new ThreadStart(delegate
{
Debug.WriteLine("Test");
}));
t.Name = "TestThread";
t.Start();
I still get that the thread has no name. The debug output is:
Test
The thread '<No Name>' (0x164c) has exited with code 0 (0x0).
What am I doing wrong? Is there a bug in 2.0 regarding thread names or
is there something else I need to do as well?
--
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no Tag: SharpPDF Tag: 125843
ClickOnce with prerequisites
Is ClickOnce deployment appropriate for an app where you have to ensure that
the user has the correct framework installed (2.0) and also installs the
SQLExpress plus scripts in the database? I've never used the ClickOnce
technology before and am debating whether to use a batch script, an
InstallShield package or ClickOnce. Any advice is appreciated. Tag: SharpPDF Tag: 125842
MI5 Persecution: Dirk Gently on the Toronto Case
Dirk was on the West Coast when he got the call. An old
friend at the Toronto police department thought he would like
to fly up and take a look at a homicide which had occurred
the previous evening. He decided to skip the last day at the
World Holistics conference and take the next plane out of
San Francisco.
The flight was bad; Dirk had been hit on the back of the head
by the Newspaper trolley, the drinks trolley, the dinner trolley
and now the gift trolley. When the hostesses weren?t trying to
tear his arm off they pestered him to stop leaning into the aisle
- ignoring the fact that the guy next to him was taking up one and
a half seats. Air Canada used to be the flight which was so
good you just didn?t wanna get off - on this occasion Dirk
would be glad to see the back of the plane and the over sized
alternative comedian wedged into the window seat.
After breathing in a couple of lungfulls of crisp Canadian air
Dirk took a taxi into town. There was a small group of
demonstrators outside the MacDonalds and the taxi driver
insisted on stopping on the opposite side of the street. ?Don?t
Eat Meat? the placards read and the demonstrators chanted. A
couple of policemen where stopping the crowd entering the
restaurant itself - one held up his arm and challenged Dirk. A
wave of the fax he had been sent and the policeman pushed
open the door.
There were few customers in the restaurant. Not surprising
really with a demonstration going on outside, half the dining
area roped off with tape and a dead body seated at one of the
tables. ?Mr Gently sir? the officer in charge called out as he
peeled one end of the tape off a column ?We were told not to
touch anything til? you got here?.
The body of the man slumped awkwardly in a chair. Then
even a dead body would start getting uncomfortable in a
MacDonalds chair after twenty minutes - and this one had
been there for at least eighteen hours. Two back legs and the
tail of a cat hung out of the man?s gaping mouth. Dirk turned
to the officer, ?I suppose you are going to tell me this is the
darndest thing you ever saw??
?Ain?t this the darnd...?. The officer seemed annoyed that Dirk
had second guessed him. ?We?re removing the body in a few
minutes, so if you can get through as quick as possible?
?Many people eat cats in fast food restaurants?? Dirk asked
and without waiting for an answer leant over the table to pick
up an untouched burger. ?And what?s this?? he asked waving
it in front of the officers face.
?It?s a Vedgie Burger? The waitress, who was cleaning one of
the adjacent tables, shouted across. She walked over to Dirk.
?We started doing them because of that lot out there? she
nodded towards the protesters who were pressing there faces
against the windows ?They?re called Linda McCartney Vedgie
burgers - ever heard of them??
Dirk suddenly felt faint, perhaps a combination of hunger and
jet lag. ?This is deja vu all over again? he thought to himself.
He glanced at policemen - at the badge on his shoulder ?OPD?
but this wasn?t Ontario this was Toronto. OPD - Officially
Pronounced Dead. It dawned on Dirk what was happening, he
knew what he would see if he looked out of the window. Sure
enough, there it was, the Volkswagen Beetle parked across
the road - number plate 28IF - 28 IF Paul McCartney had
lived. And amongst the lyrics of the song blaring out into the
restaurant he could pick out the words ?I buried Paul?. Now it
was though Dirk was viewing the whole scene though a TV
screen. This was conspiracy. Not -a- conspiracy, or -the-
conspiracy, but just plain conspiracy.
?You look faint - are you OK mister? The waitress asked.
Dirk shook his head ?Probably a bit hungry? Then to
economise on dialogue took out a pack of cigarettes and held
it out towards the girl. She was about to take one but Dirk
snatched the pack away, held it up to his mouth and drew out
two cigarettes. He lit both then passed one of them to the girl.
It was the closest he had come to a sexual encounter in three
months.
?Want a Burger?? the waitress asked.
Dirk looked down at the Vedgie Burger on the table. ?No
thanks - just a plate of fries?
The waitress walked away and Dirk looked around the room.
Apart from a family seated in the far corner there was only
one other person in the restaurant - and he wasn?t eating. The
guy was about mid twenties and had straggling, shoulder
length hair. On the table in front of him were lots of pieces of
paper cut into squares. Every so often he would pick up a
camcorder and pan it around the room and then, when he was
finished, speak into a microphone which was attached to a
tape recorder. Dirk walked over to where the man was sitting.
The small pieces of paper had paragraphs of text written on
them and were stuck to the top of table with blobs of mustard.
Lines had been drawn, some solid some dotted, on the table
top with a marker pen. The lines ran from one piece of paper
to another.
?What are the lines for?? Dirk asked, realising straight away
that ?What the hell are you doing?? would be more
appropriate.
?You see? The man replied nervously ?The dotted lines are
weak links and the solid lines are strong links. The dotted
lines are things which are happening in the rest of the world
and the solid lines are things which are happening to me. Now
you see I draw over a dotted line, replacing it with a solid line,
when I can link something back to me. Like this? The pen
squeaked over the Formica and before Dirk could interrupt
the man added. ?You see I lost my short term memory and, as
a consequence have a very short attention span. I write down,
record and film everything then put it all together later?
?So? Dirk interrupted. ?You filmed what happened here??
?Yes, yes, it?s here on this tape? The man pushed the cassette
across the table. On the label the words ?Grassy Knoll? had
been crossed through and replaced with ?MacDonalds?.
Suddenly the man sprung from his seat. Dirk turned and saw
that the body was being removed on a stretcher. As it passed
the man picked a small object off the edge of the stretcher
itself. ?This is important? he said, laying a blood stained bullet
on one of the small pieces of paper on the table.
Suddenly the room was filled with a deafening throbbing
sound as a Black Helicopter landed in the street outside. Two
men in United Nations uniforms got out and collected the
stretcher. Back at the table the long haired man was replacing
all the dotted lines with solid ones. Dirk panicked and began
to walk backwards at some speed. Barging through the swing
doors he stumbled into the kitchen, tripped and felt himself
sink slowly into a large vat.
?The guys fallen into the batter? Dick heard someone shout
before he sunk below the surface. He came to sitting in a chair
with the batter solidifying all over his body. He surveyed the
room through two eye-holes someone had cut. Suddenly the
chair on which he was sitting was picked up carried through
the restaurant and out of the building. As the chair was being
lifted and put into the back of a van, Dirk caught a glimpse of
the waitress following him. ?Your fries mister, your
plate o...?.
The doors of the van shut and Dirk tried desperately to steady
himself as it sped across town. Eventually the doors flew open
and Dirk was flung into the road at which point the solidified
batter shattered and set him free. Standing up he found
himself outside the international departures terminal of
Toronto airport.
In the departure lounge Dirk had time to reflect on the day?s
events. He had got caught up in the conspiracy theories and
the haphazard welding together of pieces of irrelevant
information. It was time to catch the person who was
operating the bizarre cognitive engine which appeared in
front of him like a fairground mirror, distorting any flaw it
could find in his own, fragile, map of the real world.
Dirk leant into the aisle of the plane as it took off for London.
The oversized person next to him swung his arms violently as
he complained about every thing from the supper in a plastic
tray to the state of British politics. With a shaven head and a
badly fitting suit the man looked as though he could have
worked behind the reception desk of the Kremlin. However
when he spoke he did so in a Liverpudlian accent. ?Me I
blame the Con-serv-a-tive government, me. The Tour-rees.
That-cher. Me. They need a good kicking? He jerked his feet
forward and struck the seat in front with his Doc Martins.
?With these. Me Doc Martins. Doctor Martin?s, Doctor
Martin?s, Doctor Martin?s Booots!? The phrase was now
being sung over and over again as the man writhed in his seat
and clicked his fingers.
Dirk looked down at the boots and thought of the reaction
most people used to deal with the paranoids at the end of the
wire. A nice quick kick. ?Oi nutter - get some therapy?. This is
the easy way out and perhaps the safest. After all there you
are sat, alone, in front of the screen. No body language
between you some paranoid. No way of telling if he really is
some gibbering psycho. Look at it too long and you be drawn
in. Fall into the tangled database of weird links with him. Who
knows he may be watching you, reassembling and linking your
experiences with his. How sure are you of you own cognitive
threads. After all cognition is only a bug fix for a neurological
system which was designed in a hurry - it?s abused by
everyone from politicians to advertisers. If people really can
convince each other that a bottle of washing up liquid is as
exciting as an orgasm using just television God knows what
they can do with a computer. Better to avoid the risk. A swift
kick. After all if you?re Homophobic you put the boot in
because you are scared of any ambiguity in your own sexuality
- why not be Nutterphobic as well.
Although Dirk would have liked to devoted time to tracking
the culprit down he decided to let it rest. The Internet
changed over the next twenty odd years. A lot of the people
who used it went out and got lives. And those who already
had lives burnt them away. The number of users had dwindled
after someone had invented a C++ program, with truth as a
variable, to deal handle politics and government. Dirk had
already retired from finding old ladies cats with the help of
obscure science when he got another call from Toronto.
It was 4th March 2025 when he booked onto the Air Canada
flight from Heathrow. The silver haired woman in the seat
next to him painted bright red lipstick around her mouth. ?Of
course it was no surprise to be offered the job after Claire
Raynor retired? she sneered? After all I used to be a
psychiatric nurse... Now if Blokes had periods they would
understand...?
By chance the taxi ride to Toronto mental hospital took him
past the MacDonalds - where the whole thing had started. Of
course it was barely recognisable having become a Church Of
Scientology Vedgie Bar. Police in riot gear kept the two sets
of demonstrators apart. Dirk didn?t really know what to
expect when he got to the hospital. The girl at the reception
desk directed him to a row of chairs in a wide well lit
corridor. There was a strong smell of disinfectant, the
furniture and the carpets were immaculately clean and behind
the rows of teak veneer doors the ?nutters? were all safely
locked away. For some reason Dirk started thinking about
CompuServe forums.
A tall blond woman in a white coat approached. ?Mr Gentle, I
assume?
?Yes? Dirk replied shaking her by the hand. ?You?re the nurse
who...?
?Doctor? She interrupted, ?Doctor Killfile? She led Dirk across
the corridor towards one of the doors then stopped with her
hand resting on the handle. ?Now you know about this person
don?t you?? and after Dirk nodded she continued ?Don?t tell
him anything about yourself - don?t let him get into you head.
If he does he?ll screw it up?
The door opened to reveal a frail man sitting in from of a TV
screen. He had a keyboard on his lap and next to the television
was a computer screen. Dirk glanced at the walls of the room
and remembered that his settee at home need upholstering.
The nurse left the room and the man looked up ?So you come
to my daughters wedding and ask me to kill a man? he said in
a dry cackling voice. ?Look? he continued, pointing at the
screen, ?I know that man. They?re talking about me now -
listen?. The man stared at Dirk. ?What?s your name? Are you
one of my friends from the Internet? - Are the lambs still
screaming Dirk??
Dirk, at first recoiled in horror, then felt a sense of anti
climax. So this is what they hyped up to superstar status on
the back of their own fears of madness. Dirk was reminded of
the film ?A day on The Beach? where a submarine had set off
to search a post nuclear World to track down a signal coming
from a remote military base - only to find it was being sent by
a Coke bottle half balanced on a Morse tapper. Outside the
room the nurse waited for him. Because his nicotine craving
had returned - and to avoid an awkward piece of dialogue -
Dirk turned to her and asked . ?Patch??
Dirk took two nicotine patches from his wallet the first of
which he stuck onto the inside of his arm. Stepping closer to
Doctor Killfile he opened her white coat and slid his hand
into the opening at the front of her dress. He pressed the
patch onto her leg as close to the top of her inner thigh as
he dare. She took a deep breath and then slowly breathed out.
?What Bogart could have done with these things? Dirk
thought to himself.
?Is he crazy?? Dirk asked tilting his head back to towards the
door.
?Who knows? Doctor Killfile replied ?We let him type away.
He sees something on the TV in the morning and it keeps him
busy all day. What he types doesn?t go anywhere it just stays
on a mainframe in the basement. It can be read by anyone else
in the building but that?s it. We got them all in here conspiracy
theorists, racists, nationalists. They?ve created a world within
a world really...? Her voice trailed away and she stared down
the corridor for a while then added ?So long are two things
are different neither will come to be in the other and so
become at once both one and two.?
Dirk gave her a puzzled look ?You mean their brains are
fried??
?Fried?? Killfile smiled at Dirk ?No that was Plato?. Then the
smile fell from her face. ?You must remember, mister, plate
o...?
716 Tag: SharpPDF Tag: 125841
MI5 Persecution: Security Service Tribunal Denies
Security Service Tribunal Denies
In June 1997 the Security Service Tribunal wrote to me regarding the complaint I had brought against MI5 in February. They say,
The Security Service Tribunal have now investigated your complaint and
have asked me to inform you that no determination in your favour has
been made on your complaint.
Again, I do not believe their denials. I think MI5 *has* taken the action against me as described, and is refusing
to admit what they have done. To the best of my knowledge, the Security Service Tribunal has *never* found in favour
of a complainant. This tends to strongly suggest that MI5 lies on a routine basis, and the Tribunal can't fulfil its
functions in the face of Security Service falsehoods.
716 Tag: SharpPDF Tag: 125838
How can I use C++ Lib file into dot net
I have a library file (.lib) which was developed in c++, I need to use this
lib file into .net
Can I convert the lib file into dll or is there any way to use this lib in
.net? Tag: SharpPDF Tag: 125831
Reading Config from custom location in .NET 2.0
My company has recently purchased a software product that spans several
technologies (ASP, COM, VB 6.0, .net 1.1, .net 2.0). We are trying to
standardize the software over to one technology (.net 2.0). Part of
this is to locate general settings (such as database connection strings
etc...) into one central location.
I was able to do this for the asp.net 1.1 Web Site, Web Services and
console apps by setting the "file" attribute of the <appSettings>
section of the relevant Config file:- E.G
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings file="D:\Mydirectory\test.config" />
</configuration>
I have created a custom class in .NET 2.0 that reads data from my
custom config file, reading from the file such as this:-
Return
System.Configuration.ConfigurationManager.AppSettings["DatabaseConnString"].ToString();
However the problem lies when trying to use this code via COM+ so as
the ASP portion of the software can get its configuration details from
the same place. As COM+ executes in it own container (I think under
dllhost.exe??) then using the above code to read a setting is obviosly
not going to work as there is no way to set the following :-
<appSettings file="D:\Mydirectory\test.config" />
What I was hoping I could do was in my custom class that gives out
configuration details, is to specify a path to where the configuration
data is stored (E.G D:\Mydirectory\test.config) and load that
configuration file into memory and read from it. Does anyone know how
to specify the location of a .config file and load it into an object to
parse it for configuration settings??? Or perhaps someone knows of a
way by using .NET 2.0 technologies (such as property settings) that
configuration type data can easily be read from ASP via COM+.
Many thanks in Advance. Tag: SharpPDF Tag: 125826
Issue in passing username and password credentials
Hi,
I am facing a problem in posting Web request with username and password
credentials.
I am working on migrating Java client application to .Net which will send
request to Java servlet.
Java Client application code:
HttpClient httpclient;
httpclient = new HttpClient();
UsernamePasswordCredentials usernamepasswordcredentials = new
UsernamePasswordCredentials(s, s1);
httpclient.getState().setAuthenticationPreemptive(true);
httpclient.getState().setCredentials(null, null,
usernamepasswordcredentials);
Object obj = null;
I want info on .Net equivalent to Java's UsernamePasswordCredentials class .
This UsernamePasswordCredentials is different from .net's NetworkCredential.
I tried below code itz not working.
Please guide me on this issue.
Thanks
Santhosh
public static string HttpWebServiceRequest(string url, string userName,
string password, string xmlContent, string domain, int timeoutMS, int reqtype)
{
try
{
System.Net.ServicePointManager.CertificatePolicy = new
TrustAllCertificatePolicy();
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
request.Timeout = timeoutMS;
request.ContentType = "text/xml";
request.KeepAlive = true;
request.ContentLength = xmlContent.Length;
request.ProtocolVersion = HttpVersion.Version10;
if((userName != "") && (password != ""))
// I need to use some different class here.
request.Credentials = new NetworkCredential(userName, password, domain);
using (StreamWriter sw = new StreamWriter(request.GetRequestStream()))
{
sw.Write(xmlContent);
}
using (StreamReader sr = new
StreamReader(request.GetResponse().GetResponseStream()))
{
return sr.ReadToEnd();
}
}
catch (Exception e)
{
throw;
}
} Tag: SharpPDF Tag: 125821
Go C# .NET for the larger applications?
Is there a list somewhere of companies or other software applications
initiatives that are using .NET for implementation? (i.e. software
running on the CLR)
I'm especially thinking of the larger applications. E.g. something
which maintains a large database or extensive GUI, etc. I just thought
of this example: would it be feasible to implement a large development
environment like Visual Studio in .NET? I'm sure it can be done, but
what can be said for it, or against it?
Maybe the question was asked before many times, but it's 2007 now and I
need to ask again (or point me to some urls please): When I have ideas
for a new software I want to develop, :
Why would I choose to implement in .NET? (probably using C#)
Pro's, cons, compared to writing a native code application? I know most
of the technical advantages, but put it this way: How would you explain
the choice to target the .NET platform to the management of a/your
company? (This latter question would be irrespective of application
size). Tag: SharpPDF Tag: 125820
Generics and constructors.
There is something that I don't understand about .NET Generics. I have code
like the following:
public class A
{
private string _paramOne;
private string _paramTwo;
public A(string paramOne, string paramTwo)
{
_paramOne = paramOne;
_paramTwo = paramTwo;
}
}
public class GenericA<T> where T : new()
{
public GenericA(string paramOne, string paramTwo)
{
new T(paramOne, paramTwo);
}
}
static void Main(string[] args)
{
GenericA<A> instance = new GenericA<A>("paramOne", "paramTwo");
}
In trying to get the strings to the type specified by the generic type
parameter I get numerous errors mainly focusing on the fact that I either
must define a parameterless construtor or I cannot use parameters in a
constructor. So my question is two fold. How do I get the arguments on the
GenericA<A> constructor to the A class? And, when and how is the type A
instantiated and constructed.
Thank you.
Kevin Burton Tag: SharpPDF Tag: 125818
Passing class through using P invoke
Hi,
I'm trying to pass an object through to unmanaged code using P invoke.
My code for .net and unmanaged (visual objects) code is below.
The object properties are not coming through right. The address is
coming across as a garbled string and the postcode is not the right
number, any ideas what i am doing wrong?
.NET CODE
*************************************************************
[DllImport(@"C:\test\test.DLL")]
static extern string
PassObject([MarshalAs(UnmanagedType.LPStruct)]TestObject oobject);
[StructLayout(LayoutKind.Sequential)]
public class TestObject
{
[MarshalAs(UnmanagedType.LPTStr)]
public string address;
[MarshalAs(UnmanagedType.U4)]
public int postcode;
}
private void Call()
{
TestObject o = new TestObject();
o.address = "test";
o.postcode = 99;
PassObject(o);
}
VISUAL OBJECT CODE:
******************************************************************************
FUNCTION PassObject(oobject AS testobject)
WarningBox{,,oobject:oAddress}:Show()
warningbox{,,AsString(oobject:opostcode)}:Show()
RETURN "what's up"
CLASS testobject
EXPORT oAddress AS STRING
EXPORT opostcode AS INT Tag: SharpPDF Tag: 125816
Custom Attributes and properties ordering
Is there any common practice for ordering of an object's properties?
Think this as an example: You have a List<OfClass> and you provide an
instance of this list as Datasource to a grid. Is there any custom
attribute that IF it will be taken into account, the grid's columns
will reflect a "custom" ordering or the class's properties?
If one provides an instance of a List<OfClass> to a datagrid, what will
the order of the columns be? Tag: SharpPDF Tag: 125811
ASP Web Project
Hi
I have a assignment of making modifications to a shopping cart which is
derived from VP-ASP opensource it as webpages of type .asp , which
Development environment is required to develop project whic have pages of
type .asp.
I tried Visual Web Developer , but it uses .aspx
TIA
Barry Tag: SharpPDF Tag: 125804
CodeDom conditional expression.
I would like to know the sequence of calls required to create a conditional
expression like:
if(a != null)
{
}
So far I have only come up with
if(a)
{
}
Which will work but I would like to know how to form expressions with '!=',
'==', '>', etc.
Thank you for your help.
Kevin Burton Tag: SharpPDF Tag: 125803
JIT Issue
Hi
I am a freelance developer on the internet.
In VS 2003 the C# Web Application would create a DLL in the bin folder, i
used to upload only all files in the project EXCEPT .cs on the clients site
allowing them to test and when the payment for my work is recieved i would
upload the .cs and maybe project files.
In VS 2005 .dll file(s) are not created, i have to upload all files, i
ended up working with a client ( a cheater) who refused to pay after he got
all the files and the site working.
Is the anyway out of this situation.
TIA
Barry Tag: SharpPDF Tag: 125802
.NET 3.0 support for Windows 2000?
Does anyone know if there is any planned support for .NET 3.0 on windows
2000?
It seems like a major miscalculation not to support win2K - there is still a
huge install base, and it will be a while before there are enough 3.0
applications to make it compelling to switch to a later OS - in the meantime
adoption is likely to be slower because of the lack of support. We are in
the process of determining an archiceture for a major new project, and it
looks like we will have to use WSE 3.0 instead of WCF (and .NET 3.0), which
is VERY frustrating.
Another question - any idea why it is is not supported? Tag: SharpPDF Tag: 125795
ClickOnce
Hi,
I have an app that the users install from the ClickOnce installation
link. One of the user is seeing the error:
System Update Required:
Unable to Run. The application requires that assembly Microsoft.mshtml
version 7.0.3300.0 be installed in the GAC first.
The machine has .NET framework 2.0 installed. What might be missing?
Thanks,=20
Avanti=20
Reply =BB Tag: SharpPDF Tag: 125794
certificate revoked problem while installing dotnet 2.0 framework
Hi,
I downloaded the dotnet 2 framework distributable, and tried to install
it.
After the unpacking phase the installer starts and then exit with an
error.
in the log file I found the following error :
C:\DOCUME~1\Yinon\LOCALS~1\Temp\IXP000.TMP\netfx.msi could not be
opened. Verify that the package exists and that you can access it.
I tried to run the netfx.msi by myself (open the installer and before
it ended copy the file to different directory) and then I get some
error about software restriction policy. I looked again in the log file
and
found the following errors:
SOFTWARE RESTRICTION POLICY: C:\DOCUME~1\Yinon\LOCALS~1\Temp\Copy of
IXP000.TMP\netfx.msi was disallowed because a required certificate in
its digital signature has been revoked by its issuer (status =
0x800B010C). The returned execution level was 0.
I looked at the files certificate and there is a remark about it: "a
certificate was explicitly revoked by its issuer"
Does any one know what should I do in order to install DotNet Framework
2.0 ?
Thanks for any help
Yinon Oshrat Tag: SharpPDF Tag: 125788
ClickOnce - microsoft.mshtml
Hi,
I have an app that the users install from the ClickOnce installation
link. One of the user is seeing the error:
System Update Required:
Unable to Run. The application requires that assembly Microsoft.mshtml
version 7.0.3300.0 be installed in the GAC first.
The machine has .NET framework 2.0 installed. What might be missing?
Thanks,
Avanti Tag: SharpPDF Tag: 125783
ClickOnce - file cannot be found
Hi,
I use ClickOnce to publish and install an application in the company. I
have a help file for the same in .chm format. It is part of the C#
project as a 'content' file. I also tried as 'embedded resource'. It
opens when the help link is clicked. The code looks like:
string exeFileName = Application.ExecutablePath;
string exeFileNameStub =
exeFileName.ToUpper().Replace(@"\Path", @"\");
exeFileNameStub =
exeFileNameStub.Remove(exeFileNameStub.LastIndexOf('\\'));
exeFileNameStub =
exeFileNameStub.Remove(exeFileNameStub.LastIndexOf('\\'));
exeFileNameStub =
exeFileNameStub.Remove(exeFileNameStub.LastIndexOf('\\')+1);
string helpFileNameAsPublished = exeFileNameStub +
@"Help-TCM.chm.txt";
string helpFileName = exeFileNameStub + @"Help-TCM.chm";
FileInfo helpFileAsPublished = new
FileInfo(helpFileNameAsPublished);
FileInfo helpFile = new System.IO.FileInfo(helpFileName);
if (!helpFile.Exists)
{
if (!helpFileAsPublished.Exists)
{
MessageBox.Show("Help request cannot be actioned
because help file is missing - contact support!", "Help file is
missing");
return;
}
helpFileAsPublished.MoveTo(helpFileName);
Help.ShowHelp(c, helpFileName);
}
Help.ShowHelp(c, helpFileName);
It works fine locally. However when someone installs it from the
publishing link, I get the error "Help request cannot be actioned
because help file is missing - contact support!"
How can I make sure the .chm file is availabel when someone installs my
app?
Thanks,
Avanti Tag: SharpPDF Tag: 125772
How to differentiate between a program launched manually and launched by a windows task scheduler ???
Hi,
I am writing a VB.NET application. It is a Windows application at the
moment.
The application contains a button. the click event of button perform a
long running task.
It needs to be started by windows task scheduler to carry out some
operation.
When I am testing the application I want to differentiate if the
"differentiate between a program launched manually and launched by a
windows task scheduler" so that in the load event of form I can call
the function which carries out long running task when application is
started by scheduler OR else if it ws launched manually then nothing
will happen automatically. USer will have to click the button to
perform the operation.
Again can someone show me ....
How to differentiate between a program launched manually and launched
by a windows task scheduler ???
Any help is greatly appreciated....
Thanks in advance,
--Mike. Tag: SharpPDF Tag: 125771
How to make global data thread safe ? Please Help...
Hi friends,
I seem to be stuck in a peculiar problem.
I have a public static class with public static members (different
array lists). The members are thus global in nature and accessible
across the namespace.
I have a worker function which is called asynchronously (so that there
are several instances running per second) and which reads the different
global members at different points of execution (not the entire set at
any one point).
I have a writer function which is used to set the global members and
this is the only one in the application writing to these variables. It
will write the entire set of globals when given control through a GUI
event.
I need a mechanism where if one instance of worker function is
accessing any of the global members and the writer function is called,
all instances of worker function (which I assume would be different
threads) should complete their read operation and wait before next read
(of another global member) until the writer function is finished
updating all the globals. This must also mean that the writer function
wait till all instances of read operation are complete and then go
ahead to update the variables.
I have gone through Lock, Mutex, Semaphore but feel quite confused
about the type of model that I should implement. Please help me.
Thanks n Regards,
Kunal Tag: SharpPDF Tag: 125770
ClickOnce Error: The application is improperly formatted
I've spent the last day trying to figure out what's wrong with my ClickOnce
deployment. I've found this question asked a lot in forums, but no helpful
answers...
I've created a WinForm application through VS2005 on my WinXP SP2 machine.
I then published it to a network drive (on our Novell network). The
deployment worked well and I was able to install it on my machine and
several others. There are some machines, however, where it won't install.
I keep getting the error "The application is improperly formatted" error
whenver we click on Setup.exe. I'll post the full error log below.
I've successfully installed on WinXP SP1 and SP2 machines. I've not been
able to successfully install on WinXP SP1 and SP2, as well as Win2000
machines, so I can't narrow it down to an OS. I've run windowsupdate on
several of the machines and still no joy.
I've tried (and failed with) the following:
- Publishing to my local machine, then copying the deployment up to the
network drive
- Copying the deployment files off the network to the machine with the
problem
- Unclicking "Sign the ClickOnce manifests" in the
Project-Properties-Signing page, then redeploying
- Creating a new test certificate through the Project-Properties-Signing
page, then redeploying
Other info:
- I've got the app set up as a "Full trust application" for the "ClickOnce
Security Settings"
- I have not manually modified the manifests after they were created
Any help would be very much appreciated!
Thanks,
Diane
ERROR LOG:
PLATFORM VERSION INFO
Windows : 5.1.2600.65536 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)
SOURCES
Deployment url : file:///J:/MyDirectory/MyApp.APP
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later
in the log.
* Activation of J:\MyDirectory\MyApp.APP resulted in exception. Following
failure messages were detected:
+ Exception reading manifest from file:///J:/MyDirectory/MyApp.APP: the
manifest may not be valid or the file could not be opened.
+ Manifest XML signature is not valid.
+ The system cannot find the file specified.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [1/4/2007 12:35:09 PM] : Activation of
J:\PSD_MIS\cccp\TESTIN~1\CCCPWI~1.APP has started.
ERROR DETAILS
Following errors were detected during this operation.
* [1/4/2007 12:35:09 PM]
System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///J:/MyDirectory/MyApp.APP: the
manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String
localPath, ManifestType manifestType, Uri sourceUri)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState,
IDownloadNotification notification, DownloadOptions options,
ServerInformation& serverInformation)
at
System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState,
IDownloadNotification notification, DownloadOptions options)
at
System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri
activationUri, Boolean isShortcut)
at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object
state)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException
(SignatureValidation)
- Manifest XML signature is not valid.
- Source: System.Deployment
- Stack trace:
at
System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream
s)
at System.Deployment.Application.ManifestReader.FromDocument(String
localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Security.Cryptography.CryptographicException
- The system cannot find the file specified.
- Source: System.Deployment
- Stack trace:
at
System.Deployment.Internal.CodeSigning.SignedCmiManifest.VerifyPublicKeyToken()
at
System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags
verifyFlags)
at
System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream
s)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available. Tag: SharpPDF Tag: 125769
ClickOnce and publishing rights on intranet IIS
Does anyone know of any way to "authorize" other developers to be able
to "Publish" ClickOnce applications to an intranet IIS machine? Where
do you have to grant the authorization? On the target folder (or
parent) or through the IIS Admin tool?
Thanks in advance.
roy Tag: SharpPDF Tag: 125767
Is anyone familiar with SharpPDF and know if it has the ability to put
a background image on a PDF?