Running a VB.Net application in a language different than the Net FrameWork
I have developped and tested a multilingual application which is
running fine. When testing from inside .NET I created a drop down menu
where I can choose the language allowing changing the language of the
User Interface. I am storing this data in the registry so when I
launch my application it is being loaded with that settings. This is
working fine when working from inside VB.Net. Running the actual Exe
it seems that my language settings are overwritten by the language of
the Net Framework. Could it be true ?
If it is true is there a way to overwrite this ?
Jean-Luc
www.corobori.com Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73340
via NUnit: Trace.Listeners.Add failure
In my c# app I create a TextWriterTraceListener object and add it to the
Listeners collection via a call to Trace.Listeners.Add(...). This works
fine in my application; however it causes the unit tests to fail when the
code gets run via NUnit tests. This appears to be some kind of permissions
problem, probably related to the fact that NUnit is running my tests through
reflection, but I don't have a clue how to proceed. Any suggestions or
pointers would be appreciated...
The error that is thrown is:
c:\windows\microsoft.net\framework\v1.0.3705\Config\machine.config Request
for the permission of type
System.Security.Permissions.StrongNameIdentityPermission, mscorlib,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
(c:\windows\microsoft.net\framework\v1.0.3705\Config\machine.config)
and the stack trace is:
>>>>>>>>>>>>>>>>>>>>
at System.Configuration.ConfigurationRecord.OpenXmlTextReader(String
configFileName)
at System.Configuration.ConfigurationRecord.Load(String filename)
at
System.Configuration.DefaultConfigurationSystem.System.Configuration.IConfig
urationSystem.Init()
at
System.Configuration.ConfigurationSettings.SetConfigurationSystem(IConfigura
tionSystem configSystem)
at System.Configuration.ConfigurationSettings.GetConfig(String
sectionName)
at System.Diagnostics.DiagnosticsConfiguration.GetConfigTable()
at System.Diagnostics.DiagnosticsConfiguration.Initialize()
at System.Diagnostics.DiagnosticsConfiguration.get_IndentSize()
at System.Diagnostics.TraceInternal.InitializeSettings()
at System.Diagnostics.TraceInternal.get_Listeners()
at System.Diagnostics.Trace.get_Listeners()
at gptg.QAtoQB.Transactions.Transaction.DumpLog(StreamWriter sw) in
c:\working barrel\tq finint\qatoqb\transactions\transactions.cs:line 46
at gptg.QAtoQB.Transactions.ProcessModel.SaveIIF() in c:\working
barrel\tq finint\qatoqb\transactions\processmodel.cs:line 168
at gptg.QAtoQB.Tests.IIFTests.BillableTime() in c:\working barrel\tq
finint\qatoqb\tests\iiftests.cs:line 29
>>>>>>>>>>>>>>>>>>>> Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73336
Socket class and thread safety
The Socket class is said not to be thread safe in the documentation.
Logicaly, that would mean that thread safety measures are required when
dealing with asyncronous socket operations. However, I have never seen any
exemple deal with locking the socket reference in asyncronous context. What
is the correct thing to do? Also, is there really any advantages to using
sockets through a NetworkStream? Is there a prefered model when dealing with
a binary protocol?
Thank you very much,
Etienne Boucher Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73334
FileSystem Bug ?
I have found a strange behavior
I use FileInfo class to retreive LastWriteTime property of some file
The file is just a JPEG image. When the image is editted by photosho
(actually the image is rotated), the LastWriteTime property
shows correct modification date. However, when I rotate the image
with the built-in WinXP Image Viever, the property does not reflec
the recent image change: it shows previous {image changing date}
I checked Image properties using windows explorer, and it show
exactly the same what FileInfo class does. If image is modified (rotated
by winXP built-In Image Viewer, the "Modified" property does not
reflect the recent image change.
The only thing I noticed that changes are file attributes
After rotation with WinXP Image Viewer, the "archive" attribute is removed
So, is it a bug or XP Image viewer modifies files
in a way that bypasses FileSystem .. or what ??
The most important thing I would like to know is actual file modification
date (date of last modification), regardless of what program had been
used to modify the file. Is it somehow possible
Thanks In Advanc
MichaÅ? Januszczy Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73332
[newbie] SQL question
Hi
in one of my programs I am connected to a database by Jet. Now, I'm looking for a SQL statement, that does the following
1. Gets every recored in a table of the db I'm conntected to (SELECT * FROM tablename, I suppose
2. Appends this whole stuff to a specific table of a specific database (filename and exact path are known)
Can anyone propose a SQL statement for this
Thanks a lo
Gordon Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73331
the framework 2.0 broke my iis snap-in in MMC.EXE
installing the framework2.0 onto w2k3 resulted in mmc.exe crashing while trying to view website's properties in iis snap-in
any fix? i'd like to run the framework asap Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73325
"JINI" architecture for .NET?
Being a .NET softwarearchitect I am of course constantly trying to get the
best of two worlds (the other being Sun/Java!) when it comes to software
design, and in particular SOA (Service Oriented Architecture).
Now - Sun's community has come up with a brilliant piece of work called
"JINI"; a selfconfiguring, selfhealing and robust peice of design.
Has anybody heard of something like this in the MS-world?
/Claus Konrad Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73323
Regular Expression Quandry
Greetings -- I need Regex help!!
For the following string,
"ANCHOR, STEER HORN, 2 1/2 IN X 3 IN X 3/15 IN DIA, 304 SSTL, UNEQUAL LEGS, F/ CC1 & 2 REGEN FLUE GAS LINES C 21, EQUIP W/ 4 IN REFRACTORY"
I need to remove all spaces EXCEPT in cases where the pattern \d\s\d exists (otherwise, from the example, "2 1/2" would become "21/2" which obviously has a very different meaning).
I can't figure out what the match expression is that will enable this functionality to work.
tia,
_howard Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73313
Timer control vs Timer class
I included a timer control in my C# project, I got the following 2 events
1. Disposed
2. Tick
I included the timer class programatically in the same C# project and I got
the following events
1. Disposed
2. Elapsed
I am stumped..:-( whats going on here? I have framework 1.1 with VS.NET
2003
VJ Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73309
Bug in MessageBox.Show
Try to run this code:
Console.WriteLine(MessageBox.Show("text",
"title", MessageBoxButtons.OK));
When the message box appear, click on the close (x) button. The
result returned will be DialogResult.OK.
Can you confirm it on your computer?
Thanks a lot... Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73306
SqlConnection question
Hi
how can I test if a specific table on an SQL- Server (that I'm connected to) exists or not
Thank
Sam Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73305
IsNumeric Function
What is prefered way to check whether a is a numeric value
Is ther something like IsNumeric function in VB6
Thanks
Mark. Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73302
Help 3DES File Encrypt in VB6 to 3DES File Decrypt In VB.NET
Hello,
My problem is two fold.
1) I must support a deployed legacy application written in VB6 SP5. I
need to export data from a database, compress it and the encrypt the data
using 3DES (to prevent tampering) data gets transmitted at night to the home
office of my company. Rewriting this application in .NET is not an option as
the application was 5 years in development.
2) After I receive the data from the outlying offices, I need to Decrypt
the data using VB.NET 2003 and the Cryptography namespace prior to
transforming the data into an AS/400.
I have successfully written VB6 code which encrypts and decryptes the data
through calls to advapi32.dll. Unfortunately, any attempts to decrypt these
files using VB.NET's Cryptography namespace results in a error and the
attempt always fails.
Can someone give me some examples or guidance in VB6 to VB.NET data 3DES
encryption/decryption??? I am really stumped on this topic. Sample code
would be nice!!! Remember the conditions - Encypt Under VB6 / Decrypt Under
VB.NET 2003.
Thanks
underwmd Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73300
adding grid to working currency manager disables addnew
I created a group of 12 pretty typical databound forms around a currency manager. They all worked perfectly, patterned after chapter 13 of ADO.NET, Core Reference, published by Microsoft Press. In one case, the DataAdapter daDT filled the dataset instance dsDT1 with one table, DateType. The table had three columns: ID(autoincrement), DateType(string), and Active(boolean - default true). Two textboxes and a checkbox. The user could view the rows one by one with the usual <<<>>>, and edit, add, delete, update(the dataset, which was merely ending the edit), and updating the ms access database(submitChanges button). Also a cancel button. Pretty run of the mill
Nevertheless, it acted quirky from time to time. One MVP took it upon himself to help me. It befuddled him as well. Finally he asked me to email the solution to time. After several days debugging, he found the problem. daDT.fill(dsDT1.DateType) caused the quirks. Instead I should use daDT.Fill(dsDT1, "DateType"). That solved the quirks
Then I decided to make the form more visually appealing. I added a datagrid called dgrd whose datasource in the property box was dsdt1.datetype. I used the mousedown event and the hittest method to synchronize changes in the grid to the currency manager , and the handler for cm.positionchanged to synchronize the grid with changes in the position in the currency manager. Not hard, just adapted from the April 2004 msdn dvd
Everything worked but the Add button. If I clicked Add, the textbox for DateType wouldn't clear. A row would be added to the grid with <null> in the DateType column, and various exceptions would follow depending on the button I clicked next
I submitted a question more than a week ago and Cor Ligthert endeavored to help me. I thank him for that. We tried dataviews three different ways. In the form_load event I set the dgrd.DataSource = (DsDT1("DateType")), but the IDE wouldn't accept it. Cor suggested dgrd.DataSource = DsDT1.Tables("DataType"). It didn't help
The problem has to be a defect in ADO.NET similar to the previous one. Rather than eliminate the grid, which adds delightful visual cues to the user, can somebody figure out a workaround
Code follows. Thanks. polynomial5
Imports System.Dat
Imports System.Data.OleD
Imports System.i
Imports Microsoft.VisualBasi
Public Class frmDateTyp
Inherits System.Windows.Forms.For
Dim cm As CurrencyManage
Public DTypeOpened As Boolean = Fals
Private Sub frmDateType_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
cnDT.ConnectionString = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Database Password=;Data Source=""" + System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\HasbaraSample.mdb"";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False
cm = CType(BindingContext(DsDT1, "DateType"), CurrencyManager
'Dim dv As New DataView(DsDT1.Tables("DateType")
'cm = CType(BindingContext(dv), CurrencyManager
'dgrd.DataSource = DsDT1.Tables("DataType") ' or something like that
'dgrd.DataSource = d
'dgrd.DataSource = (DsDT1("DateType")) ',"DateType"
AddHandler cm.ItemChanged, AddressOf cm_ItemChange
AddHandler cm.PositionChanged, AddressOf cm_PositionChange
Tr
daDT.Fill(DsDT1, "DateType"
DsDT1.DateType.Columns(0).DefaultValue = Tru
Catch ex As OleDbExceptio
Dim errorMessages As Strin
Dim i As Integer =
errorMessages += "Index #" & i.ToString() & ControlChars.Cr
& "Message: " & ex.Errors(i).Message & ControlChars.Cr
& "NativeError: " & ex.Errors(i).NativeError & ControlChars.Cr _
& "Source: " & ex.Errors(i).Source & ControlChars.Cr _
& "SQLState: " & ex.Errors(i).SQLState & ControlChars.Cr
End Try
SetEditMode(False)
End Sub
Private Sub DisplayPosition()
lblPosition.Text = cm.Position + 1 & " of " & cm.Count
dgrd.NavigateTo(cm.Position, "")
End Sub
Private Sub cm_ItemChanged(ByVal sender As Object, ByVal e As ItemChangedEventArgs)
DisplayPosition()
End Sub
Private Sub cm_PositionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
DisplayPosition()
End Sub
Private Sub btnMoveFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMoveFirst.Click
cm.Position = 0
End Sub
Private Sub btnMovePrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMovePrevious.Click
cm.Position -= 1
End Sub
Private Sub btnMoveNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMoveNext.Click
cm.Position += 1
End Sub
Private Sub btnMoveLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMoveLast.Click
cm.Position = cm.Count - 1
End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
'cm.AddNew()
DsDT1.Tables("DateType").Rows.Add(DsDT1.Tables("DateType").NewRow)
SetEditMode(True)
End Sub
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
If cm.Count > 0 Then
cm.RemoveAt(cm.Position)
Else
MessageBox.Show("No Item to Delete!", "Delete Item", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End Sub
Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
Me.Close()
End Sub
Private Sub btnSubmitChanges_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmitChanges.Click
If DsDT1.HasChanges Then
DTypeOpened = False
Try
Dim intModified As Integer
intModified = daDT.Update(DsDT1, "DateType")
Dim strOutput As String
strOutput = "Modified " & intModified & " item(s)"
MessageBox.Show(strOutput, "Update succeeded!", MessageBoxButtons.OK, MessageBoxIcon.Information)
DTypeOpened = True
Dim s = ControlChars.CrLf
Catch ex As OleDbException
If ex.Errors(0).SQLState = 3022 Then
MsgBox(ex.Errors(0).Message & s & "Please try again")
DsDT1.Clear()
daDT.Fill(DsDT1, "DateType")
Exit Try
Else
Dim errorMessages As String
errorMessages += "Message: " & ex.Errors(0).Message & ControlChars.CrLf _
& "NativeError: " & ex.Errors(0).NativeError & ControlChars.CrLf _
& "Source: " & ex.Errors(0).Source & ControlChars.CrLf _
& "SQLState: " & ex.Errors(0).SQLState & ControlChars.CrLf _
& "The form will be closed"
MsgBox(errorMessages)
Me.Close()
End If
Catch ex As DBConcurrencyException
MsgBox(ex.Message & s & "The dataset will be refreshed." & s & "Then you can navigate to the row and update it again.")
DsDT1.Clear()
daDT.Fill(DsDT1, "DateType")
Exit Try
Catch ex As Exception
MsgBox(ex.GetType.ToString & s & ex.Message & s & ex.HelpLink & s & ex.StackTrace & s & ex.Source & s & "The form will be closed") '& s & ex.TargetSite)
Me.Close()
End Try
Else
MessageBox.Show("No changes to submit!", "SubmitChanges", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
Private Sub SetEditMode(ByVal blnEdit As Boolean)
'txtID.ReadOnly = Not blnEdit
txtDateType.ReadOnly = Not blnEdit
chkActive.Enabled = blnEdit
btnMoveFirst.Enabled = Not blnEdit
btnMovePrevious.Enabled = Not blnEdit
btnMoveNext.Enabled = Not blnEdit
btnMoveLast.Enabled = Not blnEdit
btnCancel.Enabled = blnEdit
btnUpdate.Enabled = blnEdit
btnEdit.Enabled = Not blnEdit
btnAdd.Enabled = Not blnEdit
btnDelete.Enabled = Not blnEdit
btnSubmitChanges.Enabled = Not blnEdit
End Sub
Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click
If cm.Count > 0 Then
SetEditMode(True)
Else
MessageBox.Show("No Item to Edit!", "Edit Item", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
cm.EndCurrentEdit()
SetEditMode(False)
End Sub
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
cm.CancelCurrentEdit()
SetEditMode(False)
End Sub
Private Sub dgrd_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles dgrd.MouseDown
Dim myGrid As DataGrid = CType(sender, DataGrid)
Dim hti As System.Windows.Forms.DataGrid.HitTestInfo
hti = myGrid.HitTest(e.X, e.Y)
Dim iRow As Integer
Select Case hti.Type
Case System.Windows.Forms.DataGrid.HitTestType.Cell, System.Windows.Forms.DataGrid.HitTestType.RowHeader
iRow = hti.Row
cm.Position = iRow
Case Else
'Case System.Windows.Forms.DataGrid.HitTestType.None
' Console.WriteLine("You clicked the background.")
'Case System.Windows.Forms.DataGrid.HitTestType.Cell
' MsgBox("You clicked cell at row " & hti.Row & ", col " & hti.Column)
' iRow = hti.Row
' cm.Position = iRow
'Case System.Windows.Forms.DataGrid.HitTestType.ColumnHeader
' Console.WriteLine("You clicked the column header for column " & hti.Column)
'Case System.Windows.Forms.DataGrid.HitTestType.RowHeader
' MsgBox("You clicked the row header for row " & hti.Row)
'Case System.Windows.Forms.DataGrid.HitTestType.ColumnResize
' Console.WriteLine("You clicked the column resizer for column " & hti.Column)
'Case System.Windows.Forms.DataGrid.HitTestType.RowResize
' Console.WriteLine("You clicked the row resizer for row " & hti.Row)
'Case System.Windows.Forms.DataGrid.HitTestType.Caption
' Console.WriteLine("You clicked the caption")
'Case System.Windows.Forms.DataGrid.HitTestType.ParentRows
' Console.WriteLine("You clicked the parent row")
End Select
End Sub
End Class Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73298
McAffe Error
(Type your message here)
hello,please help me,I have installed McAfee VS on my PC,now when i want to scan my system,this message has appear:An exception 'Unhandled Win32 Exception' has occurred in scan 32.exe
and then the scan will stopped.is there any kind of virus in my PC?
thank you in advance
goodbye
--------------------------------
From: Hamid Naderi
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>M3e+33xX6UWrLcAUDv81UQ==</Id> Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73297
VB.NET Forms Wizard
visit http://www.eazycode.com
Introducing a unique product "EazyCode", that can do coding/programming for
you at the click of a button, in a matter of seconds.
What is EazyCode?
EazyCode is a RAD tool that integrates into Visual Studio .NET and helps you
develop and maintain front-end GUI of database applications. EazyCode is a
powerful code-generation tool that creates ready-to-use database-driven
front-end GUI applications. The main benefit from using EazyCode is the
enormous time saving. EazyCode generates thousand lines of code in a matter
of seconds.
EazyCode 1.0 generates VB.Net code and supports SQL Server 8.0 and MSDE 8.0.
KEY FEATURES
Following key features set EazyCode apart from all other tools.
1 Automatic Code Generation
EazyCode generates your front-end GUI and Data Access Layers as ADO.NET, and
provides helps generate complete Windows Forms applications.
2 Fully Integrated into Visual Studio .NET
Experience all these features without leaving your preferred IDE.
3 Object-relational mapping
Significantly decreases development time generating reliable front-end GUI
code that do all persistence and retrieval.
4 WinForm UI Generation
Generates ready-to-use and easily-extendable database-driven applications.
5 High quality code generation
Generates understandable, well-structured, and fully documented source code.
6 Stored procedures
Generates stored procedures for all database operations.
7 Support all Major Databases
Currently it supports MS SQL Server 8.0, and MSDE 8.0 for code generation.
EasyCode supports all major databases (OLEDB interface) for code execution.
8 Transactional support
The generated front-end GUI code supports ADO.NET transactions for all
database operations.
9 Near to zero debug time
Generates up to 100% bug-free code. This means your testing time is
significantly reduced because you mostly need to test just your own
hand-written code.
10 VB.Net code generation
Generates in the language of your choice: VB.NET. More languages are under
development.
11 Customizable code
The generated front-end GUI code is easily customizable according to your
needs.
12 Easy to use
EazyCode is extremely easy to use. Just connect to a database, select a
template you want to use, set the generator options, and click the "Generate
Code" button. In many cases you even don't need to know SQL!
13 VS.NET compatible
Creates VS.NET solution and project files.
14 Support for Windows .NET Framework 1.1
Generates front-end GUI code that is compatible with .NET Framework 1.1.
15 Templates use VB.Net syntax
EazyCode uses an VB.Net syntax for templates that can be easily adapted for
specific needs. You will not have to learn another scripting language, and
can use all the power of .Net Framework and flexibility of VB.
******
vb.net code generator, .net code generator, forms generator, forms wizard,
vb.net forms wizard, data entry forms generator, data entry code generator,
data entry forms wizard, vb.net data entry forms generator, vb.net data
entry forms wizard, front end generator, Front end code generator, robot,
programmer, auto programmer Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73296
RCX.NET lets you program directly from .NET code
Hi guys!
Some weeks ago I was trying to build a remote controlled (web page) camera
using my RCX and .NET. I tried many libraries and no one worked ok. Then I
decided to built my own .NET library, and It worked perfect.
Now I'm sharing this with you.Take a look and let me know any comments:
http://www.geeksco.com/rcxnet/index.htm
The programming interface is very similar to spirit's, but It does not
expose all its functionality. (Just drop me an email if you need some
additional method :-) )
enjoy!
David Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73295
Looking for Serviced Component Tutorial
Hi,
I am learning how to use COM+ services in .NET and I really can't find
any good resource. The stuff in MSDN is very simple and not
useful...
Any good resources (book/tutorial) ?
Many thanks.
Michael Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73293
Saving my Solution File
How do I automatically save my project Solution upon exiting Microsoft
Development
Environment. Under the <Tools> <Options> <Environment> <Projects and
Solution>
<Build and Run Options> I have selected "Save all changes" but this does not
save
my solution file, consequently it does not update the "date modified" file
attribute in order to
display the proper date on the MDE Start Page. Should I be using another
option if so
which one?
Tom Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73291
Compact framework throwing formatException but 'normal' framework doesn't
I'm trying to write a web services client using VB.NET (VS 2003) for a
PocketPC (using .Net Compact Framework 1.0 SP2) either on the emulator or my
device. Other services are working fine however when I try to call a service
that returns a complex object I get a "formatException". The exact same code
works perfectly using .NET Framework 1.0 on my PC. (Aren't the .Net
Framework and .NET Compact Framework the same?)
Unfortunately I don't have access to the server code (written in Java) so I
can't simplify the object to identify which part is causing the problem (see
below for the response I get back from the server) Is there any way to debug
the code that is processing the response? I found some autogenerated code in
VS which invokes the web service but not the code that actually reads the
service response.
Does anybody have any ideas as to how I can get this to work using the .Net
Compact Framework?
XML response from server
----------------------------
<?xml version='1.0' encoding='UTF-8'?>
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/'
soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:ns5='http://www.themindelectric.com/package/com.hummingbird.hc.api/'>
<soap:Body>
<n:getLatestDocumentResponse
xmlns:n='http://tempuri.org/com.peopledoc.jura.soap.CollaborationService'>
<Result href='#id0'>
</Result>
</n:getLatestDocumentResponse>
<id0 id='id0' soapenc:root='0' xsi:type='ns5:Document'>
<id xsi:type='xsd:string'>2324</id>
<name xsi:type='xsd:string'>Bum.bmp</name>
<description xsi:type='xsd:string'>Bum.bmp</description>
<parent href='#id1'></parent>
<statusID xsi:type='xsd:string'>0</statusID>
<timetable href='#id2'></timetable>
<data xsi:nil='1'></data>
<latestVersionNumber xsi:type='xsd:int'>1</latestVersionNumber>
<checkedOutByUser xsi:nil='1'></checkedOutByUser>
<checkedOutByOrg xsi:nil='1'></checkedOutByOrg>
<isPlaceHolder xsi:type='xsd:boolean'>false</isPlaceHolder>
<writePermission xsi:type='xsd:boolean'>true</writePermission>
<deletePermission xsi:type='xsd:boolean'>true</deletePermission>
<reviewVersionablePermission
xsi:type='xsd:boolean'>false</reviewVersionablePermission>
<versions href='#id3'></versions>
</id0>
<id1 id='id1' soapenc:root='0' xsi:type='ns5:FolderRef'>
<id xsi:type='xsd:string'>1941</id>
<name xsi:type='xsd:string'>Girls</name>
</id1>
<id2 id='id2' soapenc:root='0' xsi:type='ns5:Timetable'>
<isCompleted xsi:type='xsd:boolean'>false</isCompleted>
<reminderFrequency xsi:type='xsd:int'>0</reminderFrequency>
<reminderPeriod xsi:type='xsd:int'>0</reminderPeriod>
<creationDate
xsi:type='xsd:dateTime'>2003-12-09T22:43:42.843Z</creationDate>
<dueDate xsi:nil='1'></dueDate>
<completionDate xsi:nil='1'></completionDate>
<completedByUsername xsi:type='xsd:string'></completedByUsername>
</id2>
<id3 id='id3' soapenc:root='0' xsi:type='soapenc:Array'
soapenc:arrayType='ns5:VersionSummary[1]'>
<i href='#id4'></i>
</id3>
<id4 id='id4' soapenc:root='0' xsi:type='ns5:VersionSummary'>
<versionNumber xsi:type='xsd:int'>1</versionNumber>
<comments xsi:type='xsd:string'></comments>
<timestamp
xsi:type='xsd:dateTime'>2003-12-09T22:43:42.859Z</timestamp>
</id4>
</soap:Body>
</soap:Envelope> Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73283
Wallpaper
Is there a framework member that allows you to change the Windows wallpaper
Thanks Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73279
System.ComponentModel.Win32Exception: The operation completed successfully
Hi,
I wrote a form that and behaves a lot like the desktop alerts in
Outlook 2003 (fades in and out unobtrusively), then filled it with
current condition weather data (www.weathercorneralert.com). I'm
having the oddest exception that I can't track down. The app refreshes
current conditions hourly (with a System.Windows.Forms.Timer). If I
put my computer in stand by or hibernate, then bring it back up, I
often get the following exception (type, message and stack trace):
System.ComponentModel.Win32Exception
The operation completed successfully
at System.Windows.Forms.Form.UpdateLayered()
at System.Windows.Forms.Form.OnHandleCreated(EventArgs e)
at System.Windows.Forms.Control.WmCreate(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmCreate(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32
msg, IntPtr wparam, IntPtr lparam)
This is the _entire_ stack trace. Note the lack of any user code in
the stack trace. Also note that this build is built in debug mode; I
was hoping to get some line numbers. I get the same thing when I build
in release mode.
I'm clueless as to how to prevent this exception from being thrown.
I'm almost at the point where I'll just catch a Win32Exception in my
Application.ThreadException handler and swallow it.
Can anyone offer any suggestions? Thanks a lot in advance,
Travis Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73276
Using 'as' for value types...
In many occasions I found code like this (especially in Microsoft's code)
object obj1
num1 = 0
[...
if ((obj1 as short) != 0
num1 = ((short) obj1)
But when I try to do it I get an error on (obj1 as short) saying that "The as operator must be used with a reference type ('short' is a value type)
So how come it works for others but not for me
Thanx Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73275
german errortext in System.Exception
Hi,
hope somebody can help me. After some updates and patches my SystemExeption
switched to german language.
how can i switch back to english?
thx for your help
============================================================================
=====
An unhandled exception of type
'System.Runtime.Serialization.SerializationException' occurred in
mscorlib.dll
Additional information: Die Serialisierung deserialisert keine Delegate zu
nicht öffentlichen Methoden.
============================================================================
===== Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73274
ngen.exe sngen(?).exe XML Serialize
Hi
We have a problem. We have a class that we ask the .net Framework for a Serialize class and then we use it. But we have the problem that a compilation is happen every first time
We have heard of a tool that is to be released tha is some a variant of ngen.exe, the new name should be something like sngen.exe(?). (Should be a part of Widbley???
Does anyone know abything about this here? Is it possible to get a beta somewhere
Regard
/Marcu Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73273
Com Port Listener. Please Help Me.
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C4247A.84C157D0
Content-Type: text/plain;
charset="windows-1256"
Content-Transfer-Encoding: quoted-printable
Hi,
How can I read data from com port in csharp.
Best Regards,
Amin.
------=_NextPart_000_0008_01C4247A.84C157D0
Content-Type: text/html;
charset="windows-1256"
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=3Dwindows-1256">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>How can I read data from com port in=20
csharp.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Best Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Amin.</FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C4247A.84C157D0-- Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73270
Getting MX Records With .NET Framework?
The Dns class allows you to lookup IP addresses or domain names. Is there a
way to use the .Net Framework to lookup MX records?
Thanks. Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73267
what mean's of framework
can u descibe in deep detail as i dont know..
thx~~ Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73266
PocketPC 2003 unable to get device ID using KernelIoControl
Hi,
I can not get the device ID of PocketPC 2003 devices. I have been
using the code at: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/retrievedeviceid.asp
The KernelIoControl call always returns a status of
ERROR_INSUFFICIENT_BUFFER. It tells me that the required buffer size
is 36, but gives this error even when I set the buffer size to 36.
I read in another post that it has something to do with PocketPC 2003
apps running in user mode only, which does not give me the permission
to call KernelIoControl? If thats the case, is there any way in
PocketPC 2003 to get a device ID?
Any help would be greatly appreciated.
Thanks,
Tony Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73263
Interactive Windows Service
Hi
Is there a way in C# to programmatically set the interactive flag for a windows service (so to have the service installed with the right settings without need to manually modify them)
thank
traxxx Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73261
A simple Text Template tool
Hi,
I was trying to use Galois.Net to specify code generators and I had to look for
some text template tool to simplify the syntax. I was looking for something similar
to the syntax of an Asp.Net page; for example, a template file could look like
the following:
<%@ Assembly Name="ReturnString.dll" %>
<html>
<title>Testing generator</title>
<body>
<p>
Hello <%= ReturnString.Val() %>
<p>
</body>
</html>
and if the ReturnString.dll is compiled from the following code:
public class ReturnString {
public static string Val() {
return "World";
}
}
we should expect the output to be:
<html>
<title>Testing generator</title>
<body>
<p>
Hello World
<p>
</body>
</html>
I wrote such a tool and I decided to post here because it might save
other people a few hours of works since it was not completely trivial.
Galois.Net can be found at http://www.a2ii.com/galois/index.htm .And
using it to specify code generators, I have the impression that "I'm going
places".
I haven't done much testing but it was sufficient for my need. To use
it, you should compile the code below e.g. "csc TextTemplateTool.cs".
And run it, with the command: "TextTemplateTool hello.txt" where
you saved the template text above in a file named "hello.txt". (You
should also have compiled the ReturnString.dll assembly i.e.
csc /out:library ReturnString.cs). NOTE: the "code behind" facility
expect the dll to be in the same directory as the application).
I have tried to keep the code to a strict minimum. You shouldn't
have problems extend it to suit your needs.
Cheers,
-daniel
========================
Daniel Perron, Ph.D.
Lead Developer, Galois.Net
+++++++++++++++++++++++++++++++++++++++++++++++
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.Collections;
using System.Reflection;
using System.CodeDom.Compiler;
using Microsoft.CSharp;
class TextTemplateTool {
//the code that is included at the beginning of
//every program
static string prologue = @"
using System;
using System.Collections.Specialized;
public class _templateGeneration
{
public static void Main()
{
";
//the code that is included at the end of
//every program
static string epilogue = @"
}
}
";
public static void Main( string [] argv ) {
StreamReader rd = new StreamReader( argv[0] );
string input = rd.ReadToEnd();
StringBuilder buffer = new StringBuilder();
buffer.Append( prologue );
//assemblies will contain the list of referenced
//assemblies used in the template
ArrayList assemblies = new ArrayList();
//This regex will be used to identify the processing code
//in the template; we'll be looking for the string <% ... %>.
//To allow for code spanning multiple lines, we want to let
// the . in a regex to match a end of line so we use the given option
Regex exp = new Regex( "(<%.*?%>)", RegexOptions.Singleline );
string [] chunks = exp.Split( input );
string cleanup;
for( int i = 0; i < chunks.Length; i++ )
{
if( chunks[i].StartsWith("<%=") )
{
cleanup = chunks[i];
cleanup = cleanup.Substring(3,cleanup.Length-5);
buffer.Append( string.Format("Console.Write({0});", cleanup.Trim() ));
}
else if( chunks[i].StartsWith("<%@" ) )
{
//we want to get the name of the assembly
//inside the "..."
Regex asm = new Regex( "\".*\"" );
cleanup = asm.Match( chunks[i] ).Value;
cleanup = cleanup.Substring(1,cleanup.Length-2);
//we allow to use "code behind" from assembly in
//the same directory as the application
string path = AppDomain.CurrentDomain.BaseDirectory;
assemblies.Add( path + cleanup.Trim() );
}
else if( chunks[i].StartsWith("<%") )
{
cleanup = chunks[i];
cleanup = cleanup.Substring(2,cleanup.Length-4);
buffer.Append( cleanup.Trim() );
}
else
{
buffer.Append( string.Format("Console.Write(@\"{0}\");", chunks[i] ));
}
}
buffer.Append( epilogue );
//get ready to generate an assembly
CSharpCodeProvider provider = new CSharpCodeProvider();
ICodeCompiler compiler = provider.CreateCompiler();
CompilerParameters options = new CompilerParameters();
options.GenerateInMemory = true;
options.GenerateExecutable = true;
options.ReferencedAssemblies.Add("System.dll");
if( assemblies.Count > 0 )
foreach( object asm in assemblies )
options.ReferencedAssemblies.Add( (string)asm );
CompilerResults results = compiler.CompileAssemblyFromSource(options,
buffer.ToString());
if (results.Errors.Count == 0)
//if there is no error run the generated program
//that will write to the console the template with
//the given substitution
results.CompiledAssembly.EntryPoint.Invoke(null, null);
else
Console.WriteLine("*** Syntax Errors ***");
}
} Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73257
Problems running apps on Citrix for non-admins
My managed WinForms application is running fine on Citrix when logged
in as
a local administrator. When running it as a normal user, it seemed
not to
even start. To diagnose the problem, I wrote a simple HelloWorld
WinForms
app that has the exact same behavior.
To continue the investigation, I ran SysInternal's FileMon program
which
revealed that a drwatson.log and user.dmp file were being created.
Apparently when an regular user runs a .NET app on our Citrix server,
a
stack overflow is occurring. Has anyone got any ideas. I'd be happy
to forward anyone interested the drwatson log file. Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73255
How to get gdiplus.dll folder?
Hi, there
I have a Win32 app that uses GDI+. For WindowsXP, my app cannot find gdiplus.dll, since it is not installed in system folder. I was wondering if any one would know how do I get the name of the folder that gdiplus.dll is installed using some API calls, or do I have to hard code the folder name to find the dll
Thanks for your help
Michael Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73247
RichTextBox flicker solved
The RichTextBox control in .NET (1.1) seems to have a flicker problem. A
search of google revealed a lot of advice to remove flicker when
reformatting and coloring the text, but no one seems to know how to remove
the flicker when you simply enter text and there's more than about a
thousand characters. To see this problem, drag a rich text box onto a form.
Make it around 600 by 600 pixels, and turn the font up to 12 pt. Run the
program and enter four or five lines of text. You get a lot of flicker on
any further edits, and the problem gets worse as the control gets bigger and
the length of text gets higher.
The answer seems to be to add this code to a subclass of RichTextBox, which
throws away a particular event. I'm not sure how it works, and YMMV, but my
homegrown MySQL based personal journal software is now much more pleasant to
write in.
class FlickerFreeRichTextBox : RichTextBox {
protected override void WndProc(ref Message m) {
if ((m.Msg != 0x2111) || ((((uint)m.WParam >> 16)
& 0xFFFF) != 768))
base.WndProc(ref m);
}
}
I'm only posting this because I had quite a time finding the answer, and I
thought this would make it easier for future seekers.
It's amazing a bug this big got into the framework. Well, appalling, at
least.
Chris Capel Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73244
When in the heck is a .NET 1.1 Service Pack coming!!!!!!!!!!
And/Or maybe a Visual Studio 2003 Service Pack. I encounter too many
unnacceptable bugs especially with User Controls.
Does anyone know when one will come! Not saying this will solve all my
problems, but it's about time for a service pack!!!!!!
-dave Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73243
Disable Dropdown into a Datagrig
Hello All,
I hope someone can help me, I need disable a dropdown into a datagrid every time I checked a Html checkbox button. Is it possible?
thanks in advance
--------------------------------
From: Altair Costa
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>qJotRWszNU+dx2KGl2NeDQ==</Id> Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73233
Com
Hi,
I wrote an assembly in c# and i need to use it in my vc++ project so i build
a tlb from it using regasm.exe and import it in my project i also put the
dll under the directory of my exe file but it failes when i try to all the
createinstance function why???
It work fine in my xp computer when i develop it but when i install it in
another computer i get error access denined in the create instance why???
now in my dev computer i get the same problem i try to register the dll in
the GAC but it didnt help (do i must reg assembly dll`s in the gac for
inerop??)
can you tell me the correct steps to connect assembly dll from unmanage code
using com???
Thanks Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73232
XML files
Hi,
I am writing an ATL com object in VC-7 and please somone can tell me how can
i read an xml file using the atl or vc++ function`s???
Thanks Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73231
Out of Memory
Hi
i am developing an aplication in VB.NET and i have a functionality that allows users to process some images. When users processes several (big) images (imagine 5 images with 50M each), it return the message "Out of memory" and the image that it was processed is losted and the aplication process the next one...
is possible resolve or attenuate this problem without add more memory?
is possible to increase memory virtual machine of the .NET platform??
i appreciate some hel
best regard
Celest Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73228
Building satellite assemblies where the template is strong named
I need for our customers to be able to generate satellite assmblies for use in our application. The template assembly from which the satellite assemblies are based on is strong named. It seems that the private key is needed in order to generate satellite assemblies. I'm not about to distribute our private key to our customer so that they can generate satellite assemblies. Is this supposed to be how it works? How can I get around this? Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73222
What does GC.GetTotalMemory really tell us?
Jon Skeet posted some code in another thread using the
GC.GetTotalMemory(true) method as a way to demonstrate the amount of memory
being allocated for a certain data type.
That method was new to me and I thought it looked like a great simple way to
implement some general memory monitoring. So I put a timer on my Mdi parent
form and had it display the results of that call every couple of seconds.
When the results were pretty weird compared to what I expected, I wrote the
following console app. I think I understand why the results do what they do
except:
- Why the big 11k jump when the hog is created? Is that mostly the
MemoryHog class itself?
- Why the jump and not drop when hog is set to null?
Also, if I understand the documentation for passing true in the parameter,
doing so doesn't necessarily guarantee collection of all generations, only
whatever can be done in a preset amount of time. Not that it probably
matters in my scenario, but just for my curiosity.
--------------------
using System;
using System.IO;
namespace JunkConsoleApp
{
public class TestClass
{
public static void Main()
{
long howMuchBefore = 0L;
long howMuchDuring = 0L;
long howMuchAfter = 0L;
long memorybeforeCall = 0L;
long memoryAfterCall = 0L;
howMuchBefore = GC.GetTotalMemory(true);
Console.WriteLine("Memory Before:\t\t{0}", howMuchBefore);
MemoryHog hog = new MemoryHog();
howMuchDuring = GC.GetTotalMemory(true);
Console.WriteLine("Memory with hog:\t{0}", howMuchDuring);
hog = null;
GC.Collect(GC.MaxGeneration); // Just to be absolutely sure!
GC.Collect(GC.MaxGeneration);
howMuchAfter = GC.GetTotalMemory(true);
Console.WriteLine("Memory After:\t\t{0}", howMuchAfter);
Console.WriteLine(new string('-', 50));
memorybeforeCall = GC.GetTotalMemory(true);
Console.WriteLine("TestMethod-Before call: \t{0}", memorybeforeCall);
TestMethod();
memoryAfterCall = GC.GetTotalMemory(true);
Console.WriteLine("TestMethod-After return:\t{0}", memoryAfterCall);
Console.WriteLine(new string('-', 50));
memorybeforeCall = GC.GetTotalMemory(true);
Console.WriteLine("TestMethod-Before call: \t{0}", memorybeforeCall);
TestMethod();
memoryAfterCall = GC.GetTotalMemory(true);
Console.WriteLine("TestMethod-After return:\t{0}", memoryAfterCall);
Console.WriteLine(new string('-', 50));
Console.WriteLine("Press a key");
Console.Read();
}
public static void TestMethod()
{
long memoryAtStart = 0L;
long memoryWithHog = 0L;
memoryAtStart = GC.GetTotalMemory(true);
Console.WriteLine("TestMethod-Start:\t\t\t{0}", memoryAtStart);
MemoryHog hog = new MemoryHog();
memoryWithHog = GC.GetTotalMemory(true);
Console.WriteLine("TestMethod-With hog:\t\t\t{0}", memoryWithHog);
}
}
class MemoryHog
{
private string s1 = "hello";
private string s2 = "hello";
private string s3 = "hello";
private string s4 = "hello";
private string s5 = "hello";
}
} // namespace JunkConsoleApp Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73219
Treeview issue
I am working in C# .NET
If I want to invoke LabelEdit event of TreeView/ListView(property set to
true) from another event what should I do?
I was advised to send a LVM_EDITLABEL / TVM_EDITLABEL message to the
control.
But how to get the integer number for LVM_EDITLABEL / TVM_EDITLEVEL ? Or
which namespace/ref I need to add to direct access of the const value.
Please help me. Is there any way to get all those constants' hex value? Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73218
How do I retrieve the Control Type Name?
I am writing an application (in C++) to interrogate the controls on any
currently running .NET application. Most of the information I need I can
retrieve from the window and class information available through the HWNDs
retrieved using the EnumChildWindows() API.
My problem occurs with controls that have the class name like
'WindowsForms10.BUTTON.app3'. So far I have seen this class name used for
button, checkbox, radio button and group box controls, and basically all the
other windows' styles are the same for each control type. The only way to
distinguish these controls is by the control type name, and as far as I can
see this property cannot be accessed from an external process.
However I have noticed that at runtime controls within a .NET application
seem to have a property/variable called 'WM_GETCONTROLNAME' which appears to
me to be a type of windows message. Sending this value as a windows message
to a .NET control has no effect.
Could someone please tell me if this WM_GETCONTROLNAME can provide me with
the functionality I need or do I need to inject my own code into the running
process in order to retrieve the information I need from the inside???
Thanks in advance...
Mike
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004 Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73209
Adding com reference on the fly
Is there a way I can add a reference to a component on the fly in C#?
I'm adding a reference to Microsoft Word, but I want to add the
reference to the version the user is running. I have Office 2003 myself,
but unless I distribute the com.interop assemblies this makes it won't
work on another Office version.
So I'd like to check what version the user has, and use interop towards
that version.
The functions I use are the same for 2000, XP and 2003.
Guess I could install Office 2000 and add those, and it would work on
all newer versions, but that's not as elegant :)
-m Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73208
Debugger Problem in c#
Hello,
I´m using the .Net Framework 1.1. When i´m using the debugger it stoped at a breakpoint, but the Studio hang then I cannot edit the sourcecode any more and the debugger-windows do not show any informations.
I have allready deleted all created dll´s and restart the computer. The first run of the debugger seemed to be ok, but the second run hang again.
I also tried this on an other PC, where the same things happend.
Can s.o. help me or have the same problem?
Regards,
Rainer Langohr Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73201
Nasty No-touch Deployment Problems
Dear Al
Iâ??d be grateful for any suggestions as to how I might solve some nasty problems Iâ??m having with no-touch deployment (NTD) of WinForms applications.
The problems are on two more-or-less identical production Windows Server 2003 machines that have recently undergone lots of changes â?? mainly centred around the installation of Macromediaâ??s JRun 4 and ColdFusion MX products to support a third-party application my organisation has bought
The first problem is that following these changes, my WinForms apps that have previously worked fine using NTD now cause a File Download dialogue box to appear on the client PC rather than the application main form. To get the application to appear users have to pretend to save the EXE (by clicking on Save then clicking on Cancel when the Save As dialogue appears) after which calling the URL again results in the application main form being displayed - but only for that session. (On a test server that has not been subjected to all the changes the application behaves as expected with NTD.
The second problem is that I now want to deploy an application that uses a custom DLL. This application works fine on a test server, but when I move it to one of the production machines with an identical setup as far as the virtual directory is concerned the .NET Framework throws a System.IO.FileNotFoundException, saying that â??File or assembly name MyCustomDLL, or one of its dependencies, was not found.â?
It would seem that the configuration changes to the production servers are the cause of the problems, but I'm at a loss as to how I might track down the specific change. Iâ??ve tried uninstalling and reinstalling ASP.NET with aspnet_regiis but still no joy. My next thought was to uninstall and reinstall the .NET Framework, but of course itâ??s built-in to WS 2003 and the only way to repair seems to be an in-place upgrade which I donâ??t want to have to do on production servers. Iâ??m pulling my hair out on this one so all suggestions as to what further investigations I might conduct gratefully received
Thanks very much - Graham Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73200
VB.Net With Statement
Hi,
Please could someone let me know if there is a equivalent command for C#
ie
vb.net
with object
.
.
.
end with Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73196
Strong Name for VB COM dll
Hi,
I have a VB COM dll (lets name A) which references another VB COM
dll(lets name B).
I created an assembly for A dll named NETA.dll using tlbimp and then I
want to assign it a strong name and sign it and put it in GAC.
I generated key using sn utility named Akeyfile.sn
When I try to strong name it and sign it using VS.NET
[assembly: AssemblyTitle("NETA.dll")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("C:\\Akeyfile.sn")]
it returns me an error that
Assembly generation failed -- Referenced assembly 'NETA.dll' does not
have a strong name.
How am I supposed to strong name it and sign it?
And do I need to give strong name to Vb COM dll 'B' too? If yes then
how will I strong name both of them using VS.NET.? Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73193
How to automate modifying IE security settings.
Hi there
I am developing an application where in I need to launch a "Client exe" (.NET Winform app) from a Web page (which could be either in an Intranet/Intranet application).
I am able to successfully launch the executable using javascript, using the following code ......
function OpenExe(
{
var os = new ActiveXObject("WScript.Shell")
var params = "C:\Test.exe param1 param2"
var s = os.Run(params)
return
But to achive the following I need to Manually enable the IE security setting â??Initialize and script ActiveX controls not marked as safeâ?? in the respective zone.
My Question is:"How can I automate this Manual process of modifying the IE security settings ?
thanx in advance
Saurab Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 73191
Rollback transaction doesnt work when DataAdapter.Update() throws exception caused by RAISEERROR in a trigger
Hi,
I have a trigger like this (simplified to illustrate the problem):
--------
CREATE TRIGGER Test ON [dbo].[TestTable]
FOR INSERT, UPDATE, DELETE
AS
RAISERROR( 'test trigger error !', 16, 1)
---------
And a C# code portion: (new record inserted in dsFormTest.TestTable)
---------
OdbcTransaction odbcTrans = null;
try {
if ( odbcConn.State != ConnectionState.Open ) odbcConn.Open();
odbcTrans = odbcConn.BeginTransaction();
odaTest.InsertCommand.Transaction = odbcTrans;
odaTest.Update( dsFormTest.TestTable );
odbcTrans.Commit();
}
catch( Exception xc ) {
if ( odbcTrans != null ) odbcTrans.Rollback();
MessageBox.Show( xc.ToString() );
}
odbcConn.Close();
----------
BUT, instead of rolling back transaction, the odbcTrans.Rollback() throws
new exception with message:
System.InvalidOperationException: RollbackTransaction requires an open and
available Connection. The connection's current state is Open, Fetching.
any clues why? Tag: how to retrieve the executing method from the ProcessThread.StartAddress Tag: 70684
how to retrieve the executing method from the ProcessThread.StartAddress