Unable to install .Net Framework 1.1 SP1
Whenever I attempt to install it it says it cannot find a .msi file in
another directory. I attempted to repair the installation but that gives me
the same type of error, cannot find specified .msi file. How do I repair
this properly? Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107471
How to Open a File in Text-mode?
It is that in Traditional C++ ,the Class "file" has a Open Method which can
specify opening a file in Text-Mode.
The Text-Mode can automaticaly Convert "\r\n" to "\n" (\13 \10 to \10).
But,I can not find a way to do this in Extention Managed C++.Net ?
Any new Solution? Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107470
Asynchronous WebClient
I'm trying to automate a process of logging in to a website and posting and
downloading some stuff. I am using asynchronous WebClient methods so the
user can cancel the operation at any time and it's working fine, but I have a
question about the structure of my program. Right now I've got something
like this:
Main()
{
WebClient LoginClient = new ...
// set the relevant properties and eventhandlers
LoginClient.UploadValuesAsync(...);
}
LoginClient_UploadValuesCompleted(...)
{
if(!Cancelled && !Error)
{
WebClient Page1Client = new ...
// set the relevant properties and eventhandlers
Page1Client.DownloadDataAsync(...);
}
}
Page1Client_DownloadDataCompleted(...)
{
if(!Cancelled && !Error)
{
WebClient Page2Client = new ...
// set the relevant properties and eventhandlers
Page2Client.DownloadDataAsync(...);
}
}
etc.
I've got about 5 or 6 pages I need to get and I have to get them in order,
so in each request's completed event handler I start the next request. Is
this the right way to do things? There seems to be a fair amount of repeated
code and it just feels a little strange, but it works fine.
Also, whenever I start the program and start the first request for the first
time it blocks for about a second even though it's started asynchronously.
No other requests block, even if I cancel and restart the request sequence.
If I restart the program, the first request blocks again. Is this just
because some initialization occurs in the background or something? Is there
any way to avoid this? Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107466
FtpWebRequest in 2.0 Framework
Has anyone tried to download a mainframe file with FtpWebRequest. It doesn't
seem to translate from EBCDIC to ASCII.
The old inet control in VB6 has the same problem.
Command line FTP has no problem to translate from EBCDIC to ASCII, but I
prefer a .Net assembly. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107463
Wellknown-Singleton object is being created 2 times
Hi,
I have a singleton class which I want to "create" (call it's
GetInstance() for the first time)
in server process, and after some time I want to use it in client
process, through .Net Remoting.
I define the singleton as MarshalByRefObject.
My server process looks like this:
1.Register singelton type as being wellknown singleton (not
singlecall).
2. Singleton.GetInstance()
3. Console.Write("Singleton constructor called");
4. do some logic inside the singleton
5. Wait for clients to connect
Client process looks like this:
1. Register singleton type.
2. Singleton.GetInstance()
After this call, "Singleton constructor called" is being printed AGAIN
on the screen,
which means that the singleton object is being created again, and thats
not what I want.
I want to receive proxy to the same singelton, already created in
server process.
I don't understand what I do wrong.
Please help,
Mike. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107457
ANN: OleDBProNet for .NET version 2 is released at www.udaparts.com
Hi, All:
OleDBProNet is a .NET class library which is a complete, feature-rich,
and extremely powerful data access solution for .NET programmers through MS
OLEDB technology. It offers the following key benefits over ADO.NET:
1. Extremely simple:
OleDBProNet hides all of complexities of raw OLEDB programming. It is
written with the classical ADO data accessing model. You will never meet
BLOBs and other complicate data types conversion to bother you for all types
of SQL statements.
OleDBProNet comes with fifteen real and advanced C# and VB.NET samples
to assist your developments no matter what programming background you have.
If you have somewhat background in old ADO (Active Data Objects), you
will feel OleDBProNet is extremely simple and intuitive to use.
2. Many features available:
OleDBProNet supports all types of client and server cursors as shown in
the attached samples. It supports all of advanced rowset navigation features
(bookmark, record searching, index, bi-directional scrolling and jumping
etc) directly on server side. OleDBProNet offers much more features than
ADO.NET.
3. Super performance:
OleDBProNet is written from Visual C++ 2005 C++/CLI with direct use of
raw OLEDB interfaces, which almost eliminates data marshaling across layers
between native and managed codes completely. Also, OleDBPro uses batching
mode (20 records per batch) to retrieve and update records by default.
Generally, OleDBProNet is about five times as fast as ADO in .NET
environment. Also, OleDBProNet is about 15% faster than MS OleDB.NET
provider.
OleDBProNet can manage huge data records using server cursors, but
ADO.NET can't. Therefore, OleDBProNet is significantly faster and simpler
than ADO.NET for accessing a large number of data records.
4. Complete solution to all types of your databases:
OleDBProNet is a complete solution to all of types of databases, SQL
server, Oracle, Access, MySQL, DB2, ....... As long as you have an OLEDB
provider, or ODBC driver, or ISAM driver available, it will work for you
with one copy of code.
--
Yuancai (Charlie) Ye
Fast accessing all of remote data sources anywhere with SocketPro using
batch/queue, non-blocking and parallel computation
See 30 well-tested and real OLEDB examples
at http://www.udaparts.com Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107456
Access file on another computer with specific username / password
I need to access files on computers around our network, some are on the same
domain as myself, and some are on others. I have an account for each domain
with rights to read files on each system, but I can't figure out how to
specify a username/password when using the System.IO namespace to read files.
Is this possible and if so, how might I accomplish the task?
Chris Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107455
Email Sed Error
Hi,
I use the following code snippet in VS 2005
Dim message As New MailMessage("timpowell@controlequipment.co.uk",
"timpowell@controlequipment.co.uk", "Subject", "Message Text")
Dim emailClient As New SmtpClient("10.34.45.135")
emailClient.Send(message)
When I execute the code I get the below error.
System.Net.Mail.SmtpException was unhandled
Message="Failure sending mail."
Source="System"
StackTrace:
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at WindowsApplication1.Form1.Form1_Load(Object sender, EventArgs e)
in C:\Documents and Settings\TPowell.CEL\Local Settings\Application
Data\Temporary Projects\WindowsApplication1\Form1.vb:line 7
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(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.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd,
Int32 nCmdShow)
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at WindowsApplication1.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Any help would be much appreciated. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107454
Convert MS Word Document in HTML
I want to convert MS Word Document in HTML file.
I would like to do it, without having MS Word installed on server.
Is this possible? Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107453
IDisposable and Finalization
I believe that I fully understand the concepts behind IDisposable and
finalization (at least I hope I do) and I would like to get feedback from the
experts so that I can forward them on to others.
There are people who think that if a class implements IDisposable then it
should include a finalizer. What I told them was that you should only
include a finalizer if you have unmanaged resources you need to ensure are
cleaned up. Otherwise you should not include a finalizer whether or not you
implement IDisposable.
As an example of this case, the one where you might want to implement
IDisposable but do not need a finalizer, I said assume you have a class that
internally makes use of a FileStream object. It might open the object up at
some point during its lifetime and keep it open from then on. In this case
you might want to implement IDisposable to provide an explicit mechanism for
the caller to indicate they are done with your class. The implementation in
your class would simply call the FileStream's IDisposable.Dispose() method.
I argue that this class does not need a finalizer and in fact if this class
did include a finalizer it would be of no use. By the time the finalizer was
called you could not do anything with your FileStream instance as it may have
already been disposed (assuming you don't expose the instance outside your
class).
Is my statement/explanations valid?
--
Thanks,
Nick Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107452
deserialising system.object using xmlserialiser
Hi,
I want to deserialize the following class which has a object type of
member using xmlserialiser.The NamedValue.value can be any type of user
defined class/predefined types or single/two dimensional array.
public class NamedValue {
/// <remarks/>
public string name;
/// <remarks/>
///
public object value;
}
I am using XmlSerialiser to deserialise the xml. Although the class gets
deserialised but the representation of NamedValue.value is in the form of
XmlElement instead of long[] when the xml contains the array of long
xml fragement
==========
<name xsi:type="xsd:string">Missing information</name>
<value soapenc:arrayType="xsd:long[1]" xsi:type="soapenc:Array">
<value xsi:type="xsd:long">27148</value>
</value>
Is it possible to have a proper representation of NamedValue.value instead
of XmlElement.
--gaurav Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107451
Process.HasExited property does not work as expected
I've created a windows service to ensure another service is running. First of
all, I look for the process relative to the service I'm monitoring. The code
is:
Process[] processes = Process.GetProcesses();
foreach(Process process in processes)
if(!process.HasExited &&
process.Id > 0 &&
process.ProcessName.ToLower() != "system" &&
process.MainModule.FileName.ToLower() ==
serviceDetail.ExecutablePath.ToLower())
...
The problem is with the MainModule property, called at the end of the if
statement. Internally, the MainModule property gets all modules for the
process and looks for the main one. So, if the process has exited, the search
for the process modules fails and we get an exception.
In order to solve this issue, I test the HasExited property at first place.
However, I still get an exception: "Cannot process request because the
process (3248) has exited." Why this exception occurs if I have tested the
HasExited property? Am I doing somethig wrong or missing something?
Another exception is thrown too. Sometimes I get an "Access is denied"
exception from this code piece.
Does anyone have any idea that could help me?
Thanks in advance.
Ricardo Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107450
Checking that a file is not in the process of being copied
How can I check that a file is not in the process of being copied ?
I want to copy a file from a source path to a destination path, but if the
file is in the process of being copied to the source path, then my code will
fail. If it is in the process of being copied then my code needs to wait for
the copying to finish.
The code below is what I tried, but file.length returns the full file
length, even when the whole file hasn't finished copying.
Any ideas ?
Craig
Private Shared Sub CheckFileCopyComplete(ByVal filePath As String)
Const MAX_TIME_IN_SEC As Integer = 60 * 5 '5 mins
Const PAUSE_IN_MILLISEC As Integer = 500 '0.5 sec
Dim file As New IO.FileInfo(filePath)
Dim fileLength As Long = 0
Dim startTime As DateTime = System.DateTime.Now
Do Until file.Length = fileLength
fileLength = file.Length
System.Threading.Thread.Sleep(PAUSE_IN_MILLISEC)
If System.DateTime.Now.Subtract(startTime).Seconds > MAX_TIME_IN_SEC
Then
Throw New ApplicationException("Timeout waiting for file to copy")
End If
Loop
'file finished copying: move on
End Sub Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107445
CodeDom - parses sourcecode into a tree?
Hi,
I've encountered the following problem:
My input is a .cs file. The output I need is a parsed tree.
I'd like to use CodeParser.Parse which Compiles the specified text stream
into a CodeCompileUnit. (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemcodedomcompilercodeparserclassparsetopic.asp
). However, it seems like there is no implementation of this function in the
.NET framework.
Is that true? is there no way to create a codecompileunit object from a
sourcecode? If so, which parsers would you recommend?
I checked a few, including goldparser and programmar. Is this the right
solution, or am I missing something in the CodeDom solution?
Thanks in advance,
Engel Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107443
badPwdCount and old user passwords
Hello,
trying to authenticate my users against active directory in an
webservice. Webservice is on an Win2K3 Domaincontroller for testing
purposes. Therefore I have checked two methods:
1. I use the system.directoryservice method, with "LDAP" search path,
username, userpass.
2. I use the LogonUser function in lib advapi32.dll.
My domain policy says, that the useraccount will be locked after three
wrong passwords. Also I set, that the users password may not repeated
in 24 password cycles.
With both methods i can check username and password. Both Methods
working well for me.
Supplying a wrong password will increase badPwdCount property in active
directory and after the third wrong password the account is locked.
But, I tested this behavior also with old, previous used user
passwords. If I send an old user password the counter badPwdCount will
not increased and so, the user will never be locked.
Is this by design or a bug? I'am asking, because I expected if a user
takes a wrong password, he will take one of his old passwords and not
an totally different, wrong password.
BTW: It seemed, that the badPwdCounter is readonly. I can't set it
manually.
Thanks ahead,
Carsten Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107435
Can I write MFC application and without .net Framework with Visual C++ 2005 Express?
Hello,
I would like to learn MFC programming.
However, Visual Studio is expensive.
Can I write MFC programs with the VC++ 2005 Express
but without bothering the .net framework?
--
Best Regards,
W. Jordan Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107434
UserInterfaceProcess AB and CompositeUI AB
Hi,
(I do not know which is the exact newsgroup for this post)
I am doing application based on SOA.
My client app is winforms and we are targeting it as smart client.
I know about MVC in general. And I am puzzled how to go with MVC in my
this Smart Client User Interface (winform based) app.
First I see UIP AB and then CompositeUI AB.
UIP AB looks additional complicated for smart client app considering
Model part and interaction of model with other in MVC. While I like
WindowsFormControlView because we do not have interfaces like series of
Form instead one Form.
Note I want to work striclty on Dot Net 1.1.
Desc:
I have an MDI app client side ui, which is a smart client that it only
talks to server thru Web Svc (the most fundamental part of smart client
apart from rest).
SOA is already there.
I want my Client UI MVC driven.
1) Dot Net + MVC = UIP AB (app block)
2) Dot Net + Smart Client + WinForms = CompositeUI AB (CAB)
For 1) I can have separate controller for separate view (winform or
user control) or one for all or ...
Model is Web Svc. Or like on smart client there is only view and
controller and model thing is web svc which is on server.
Fro 2) I can have my UI as (user controls plus winforms) as smart
widgets and achieve my objective through CAB.
Now what you ppl suggest?
Please advice.
(Plus If I cannot use CAB can I make it source work on dot net 1.1 or
at least can i see its Class Diagram Design?)
Thanks
---
hB Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107430
2.0 Beta has no XML namespace
Hi,
I download and install VB.bet 2005 Express and also dotnet frame 2.0 Beta on
my pc. I want to try XML functions, but there is no XML namespace under
system!! Where is could I find it.
P.S When I try to install dotnet frame 2.0, it indicates that I should
uninstall 2.0 Beta first. After I unstall 2.0 Beta and install dotnet frame
2.0, VB.NET 2005 express cannot work anymore.
thanks Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107427
2.0 Beta has no XML namespace
Hi,
I download and install VB.bet 2005 Express and also dotnet frame 2.0 Beta on
my pc. I want to try XML functions, but there is no XML namespace under
system!! Where is could I find it. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107426
Modem dial causes terminal services to disconnect
hi, we are experiencing an issue on WS2003 where when a modem conneciton is
dialed the terminal services connection is dropped, is there a workaround for
this?
Thanks
David Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107423
Visual design tools and DAL in VS 2005 / .NET 2.0
Hi
I wrote quite a few apps with .NET 1.0 and 1.1, which made use of a Data
Access Layer, and also used the Microsoft Application Blocks for Data Access
(v2).
In VS 2005, there is a huge improvement in 'visually' designing the data
access, and binding it to the controls on the form.
I have 'played around' with the SqlDataSource component, which allows very
quick, easy and simple access to a SQL DB.
However, I have a couple of considerations, which I would like to get
opinions on....
1). If I want to use a common ConnectionString (ie. just have it coded in
one place), how can I bind each of my controls to this connection?? (ie. I
don't want to change 100's of controls if my connection string changes).
2). I want to keep in mind the 'Enterprise' way of doing things, via a DAL
or Business Layer.
Does anyone have any good source (C#), which shows the implementation of a
Front end, DAL, and the component bindings. This can be using SQL commands,
or Stored procedures, but I would appreciate details of Updates / Inserts
etc, as well as simple selects (so that I can see the impact on Table
Adapters etc).
Thanks in advance
Paul Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107420
HttpWebRequest / Response disconnect question
Hi all,
I'm trying to figure something out and not quite sure if I'm doing it
the right way. First, the quick overview and I'll post more info if
it's needed.
On my web site, I've got an HTTP Module that serves binaries. It
basically just reads them from disk and streams the bytes to the
client. This works fine -- every 10k I check if the client is
connected, and if so, read another 10k, etc.
I have another process that pings a few URLs using an HttpWebRequest
and HttpWebResponse. If the content type isn't plain text or HTML, I
don't try to read the site content and instantly try to close the
connection. I was hoping this would prevent the files from being
downloaded (some are quite big), but that's not the case.
If I debug both the web app and the pinging utility, I see the request
made, and the first bit of of data is pushed to the app. The app sees
the content type, and attempts to close the connection. The thing is,
the close() call doesn't return until the module is done streaming.
Each check to see if the client is connected is still returning true
(which it is, since the client hasn't disconnected yet). When the
module is done streaming the content, the close call in my app returns.
Any Ideas? Happy to post more code. Ideally I want the close call to
instantly sever the connection...
Thanks!
Tom Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107418
Q: how to do stable sort in ArrayList?
Hello,
Here is my problem:
I have an ArrayList with duplicate keys. I 'd like to preserve the original
order when sorting the list by using ArrayList.sort(comparer* c). However
when the comparer returns 0 (meaning the two objects are equal), the order of
the two objects are random or not preserved. I understand it's not a stable
sort. I also tried to return just -1 in my compare class when they are equal.
But this created a deadloop inside ArrayList.sort() for unknown reasons.
Does anyone know to how get around this?
Thanks.
David Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107409
How to login remotly
I 'd like to login into a remote computer that has a share . How can i do
this using dotnet ? Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107408
Exporting Report
About Crystal Report, i need to export it into Word File, in case i need to
modify anything in the report LayOut as it is required by the user,becuse the
kind of information raised from this report is not in the form of tables,and
the user need to highlight or add any comment to the report before printing. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107407
Process id=0x1c8(456), Thread id=0xb00(2816)
I have a small home network one of them win2000pro server and one XP Pro
won't let Automatic Update install the Microsoft .Net Framework 1.1 install
all other update install fine
on the win2000pro server after trying install it comes up st.20.tmp-Common
Language Runtime Debugging Services
Process id=0x1c8(456), Thread id=0xb00(2816) if I click on cancel no
debugger found
Registered JIT debugger is not available. An attempt to launch a JIT
debugger with the following command resulted in an error code of
0x2(2).Please check computer settings ?(I don't know what setting)
cordbg.exe !a 0x1c8
bin searching on the Microsoft help search came up to change the
registry.......for .NET Frameworks
I have the newest Norton system works and firewall and Antivirus scan all
network drive's but came up with no problem there
the same problem I'm getting on my xp pro now need some help for my school
work.
thanx Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107404
How to start ASP.Net application from console application?
Hi,
I have the following problem:
I have a singleton class that I want to access from asp.net
application. The trick is, that I want to create it
(Singleton.GetInstance() for the first time) in console application.
In other words, I want the following to happen:
1. start console application
2. create object
3. start asp.net and pass the object reference
4. after some time, user surfs to asp.net page, and sees some
properties assosiated to that
object.
Can I accomplish that without using 2 processes (console and asp.net)
and .Net remoting between them?
Thanx alot,
Mike Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107397
How to specify the filename when exporting from a servlet an XLS?
Hi,
I have a servlet that generates a report and exports it as XLS. When I
open it in Internet Explorer I get the XLS report but the problem is
that instead of the name I have set to the report I get the name of the
servlet.
For setting the name I use: response.setHeader("Content-Disposition",
"inline; report.xls");
When I want to save the file, the file name is not report.xls as
expected, but ReportGenerator.xls(the name of the servlet that
generates the report)
Even more if I use: response.setHeader("Content-Disposition",
"attachment; report.xls");
everything works as expected.
Anyone any clues?
Thank you,
Florin Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107396
Internet Explorer CLR Integration
Are there plans to integrate the CLR with Internet Explorer?
Could that happen in IE7, or will .NET only be distributed by Microsoft with
future Windows (Vista) and previous versions' service packs?
Also, does anyone foresee client-side scripting being handled by the CLR in
the future... and would they even consider exposing framework libraries to an
IE CLR scripting host. Or is this just garbage because windows forms
controls can already be hosted in IE?
-Andrew Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107393
dll in .NET and eVC application
We have an application that is written in eVC 4.0. We are planning on
writing a .NET dll in C# that can take advantage of regular expressions
to do some address validation. The idea is that the eVC application
would call the dll do the address validation. The question is: is this
even possible? Can a non .NET application (in this case one that is
written in eVC) interact with a .NET dll?
Thanks in advance. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107391
.NET dll and embedded Visual C++
Hi everyone,
We have an application that runs on CE platform that is written in
embedded Visual C++. Presently, we are thinking of writing a .NET dll
(to take advantage of regular expressions in .NET) and having the
application call this dll to do some address validation.
The big question is: is it possible for an application written in
embedded Visual C++ to call a dll written in .NET (using C#)?
Thanks in advance. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107390
Validation / Logic Layer architecture
Hi,
I am working to clean up an application that is split into 3 major layers
(asp.net, logic, data).
In the logic layer, many of the methods seem to have a fairly lengthy
validation process, which is eventually followed by the real purpose of the
method. For instance, if I have a method that passes in a series of
parameters, each parameter is checked, validated and in the case of errors,
the appropriate message is generated to be passed back to the presentation
layer. Finally, if all the validation has passed, I can call the data layer
modules to perform the updates to the various tables.
Does it seem extreme to split this logic layer into two separate layers
(validation and logic)? Is there a cleaner way to perform validation in the
logic layer?
The methods always look similar to this:
If()
Createerror("msg")
Else if()
Createerror("msg")
Else if()
Createerror("msg")
Else if()
..
Else
{
DoLogic1()
DoLogic2()
DoLogic3()
}
Sometimes the validation is really long. hheh, and it makes me sad.
Oh well.. If this is a small issue and nobody really worries about this,
then please let me know too! Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107387
NDoc and the web services
I've tried NDoc with an Asp.Net web service but it doesn't work.. why? Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107382
ASP.NET 2.0 Frustration - MS Please Help
I have a request of Microsoft and I hope they see this.
I use Visual Studio 2005 Pro and WIN XP Pro with IIS 5.1
I have spent the better part of the last 2 weeks attempting to get my
ASP.NET projects to work. Just a simple hello world.
Since installing the 2.0 of the framework, localhost no longer works on IIS.
localhost is required for (at least it appears so) for the ASP.NET
development server to function. Actually I take that back. localhost will
work but now is very slow but not with anything ASP.NET. the development
server icon appears, gives it a port uses localhost but it wont work. All I
get is page cannot be displayed.
I get errors when trying to set up the quickstarts such as:
Failed while restarting W3SVC. Error code: 0x8007041d
Though it actually will start. When I go to check it is running.
I also get htis error under system:
The application-specific permission settings do not grant Local Activation
permission for the COM Server application with CLSID
{0C0A3666-30C9-11D0-8F20-00805F2CD064}
to the user COMPUTER11\IWAM_COMPUTER11 SID
(S-1-5-21-1292428093-839522115-725345543-1026). This security permission
can be modified using the Component Services administrative tool.
I got to Component Services and of course no such
entry(0C0A3666-30C9-11D0-8F20-00805F2CD064) exists under COM under DCOM
config.
Is it possible MS could put out a tool that would configure IIS (and Windows
if necessary) to work with ASP.NET 2.0 so I can actually move on from here.
Right now, I am flat out stuck.
I have uninstalled the Framework 2.0 and IIS, and reinstalled IIS and then
the Framework. I have registered so many times.
If I seem frustrated I apologize. This should not be that difficult.
Kelly Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107363
.Net 2.0 - The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I have this .Net dll I'm using. But when I depoly my app to a 2003
server with the 2.0 framework installed I get the error message below.
The dll is a 1.1 dll, but I have also compiled it under 2.0. It looks
like a COM exception of some kind but it gives me no information what
so ever as to which component is causing this error. On my XP machine
it works just fine.
Any help on the matter would be greatly appreciated.
----
The specified module could not be found. (Exception from HRESULT:
0x8007007E)
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: The specified
module could not be found. (Exception from HRESULT: 0x8007007E)
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Stack Trace:
[FileNotFoundException: The specified module could not be found.
(Exception from HRESULT: 0x8007007E)]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +32
[ConfigurationErrorsException: The specified module could not be found.
(Exception from HRESULT: 0x8007007E)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
assemblyName, Boolean starDirective) +596
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
+3478057
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo
ai) +46
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection
compConfig) +177
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory
vdir) +267
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory
vdir, Boolean ignoreErrors) +36
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory
vdir, VirtualPath virtualDir, Boolean ignoreErrors) +429
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
virtualPath) +73
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath
virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean
allowBuildInPrecompile) +580
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
context, VirtualPath virtualPath, Boolean noBuild, Boolean
allowCrossApp, Boolean allowBuildInPrecompile) +93
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath
virtualPath, HttpContext context, Boolean allowCrossApp, Boolean
noAssert) +111
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath
virtualPath, Type requiredBaseType, HttpContext context, Boolean
allowCrossApp, Boolean noAssert) +54
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext
context, String requestType, VirtualPath virtualPath, String
physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext
context, String requestType, VirtualPath virtualPath, String
physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context,
String requestType, VirtualPath path, String pathTranslated, Boolean
useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+120
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
completedSynchronously) +155
Regards,
Zoneboy Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107361
Load Tree View from Configuration Block
Hi guys ok ok I know i can read the xml directly to a treeview, but I
think the configuration block is more useful for me since it caches
nicely and i like frameworks to be used.
Ok what i wanted to do was have a nicely structured config file to read
into a treeview, e.g
<Node>
<Node1.1></Node1.1>
<Node1.2></Node1.2>
<Node>
<Node2>
<Node2.1></Node2.1>
<Node2>
all fine and dandy but i cant read this out of 1 config file eg.
here's the config file
<DealTreeSettings>
<xmlSerializerSection type="ConfigurationQuickStart.TreeData
ConfigurationRuntimeData, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null">
<TreeData xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SpotName>xxxxx</SpotName>
<PreciousName>xxxxxx</PreciousName>
</TreeData>
<TreeData1 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FxOptionName>yyyyyy</FxOptionName>
</TreeData1>
</xmlSerializerSection>
</DealTreeSettings>
Now I cant create mulitple xmlSerializerSection so how do i read all
the nodes ? ie read both TreeData and TreeData1.
i can read the first lot of nodes by name nicely from the class and
populate the treeview eg <SpotName>,<PreciousName>
problem is i dont want to add all the nodes under the TreeData since i
dont want additional logic when building the view.
Cheers nitesh Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107357
Detecting memory card/USB device insertion - how to?
Hi,
I want my app to respond to attachment of a memory card (SD) and/or a
particular type of USB device to a client PC. Both devices have on them the
same file/directory structure - i.e. a directory structure recognisable to
my application.
What I would like to do is have my .NET Windows Form app start automatically
(if it is not already running) when either device is attached to the
machine, and have the files pre-selected in an explorer-like window for the
user to take further action with. Adobe Elements does this, for example,
when I attach my Compact Flash card to my PC - it seems to use a Windows
Service called 'Adobe Active File Monitor' that runs constantly in the
background.
Any ideas how to do this, or better still any code out there that already
does this? I don't think the .NET FileSystemWatcher will work for removable
devices, so I suspect that a bespoke polling component is needed. If so, how
is it best to detect the presence or otherwise of removable drives?
Thanks,
Chris Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107355
Resource access and culture info
am having some trouble accessing culture specific resources using Vs.Net
2005, what process have I missed?
* Created a Windows Forms Application called GlobalTest
* Created the following code in button1_Click :
ResourceManager rm = new ResourceManager("strings",
this.GetType().Assembly);
CultureInfo ci = new CultureInfo("en-US");
MessageBox.Show(rm.GetString("test", ci));
* Added a file called 'strings.en-US.resx' to my project and created a
string entry with the name 'test' and a value of 'hello world'.
Created a key.snk using sn -k key.snk at the VS2005 command prompt and
signed my Windows Application with it.
VS.NET 2005 builds the application and satellite assembly with the following
parameters -
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig
/nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
/debug+ /debug:full /keyfile:key.snk /optimize-
/out:obj\Debug\GlobalTest.exe /resource:obj\Debug\GlobalTest.Form1.resources
/resource:obj\Debug\GlobalTest.Properties.Resources.resources /target:winexe
Form1.cs Form1.Designer.cs Program.cs Properties\AssemblyInfo.cs
Properties\Resources.Designer.cs Properties\Settings.Designer.cs
Compile complete -- 0 errors, 0 warnings
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\AL.exe /culture:en-US
/keyfile:key.snk /out:obj\Debug\en-US\GlobalTest.resources.dll
/template:obj\Debug\GlobalTest.exe
/embed:obj\Debug\GlobalTest.strings.en-US.resources
GlobalTest -> C:\Documents and Settings\gary\My Documents\Visual Studio
2005\Projects\GlobalTest\GlobalTest\bin\Debug\GlobalTest.exe
I get the following error message -
System.Resources.MissingManifestResourceException: Could not find any
resources appropriate for the specified culture or the neutral culture.
Make sure "strings.resources" was correctly embedded or linked into assembly
"GlobalTest" at compile time, or that all the satellite assemblies required
are loadable and fully signed.
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo
culture)
at GlobalTest.Form1.button1_Click(Object sender, EventArgs e) in
C:\Documents and Settings\gary\My Documents\Visual Studio
2005\Projects\GlobalTest\GlobalTest\Form1.cs:line 27 Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107351
Microsoft - is there a comprehensive list of what's new in 2.0?
I just found it. In msdn 2. By navigating. It's in the Visual Studio
hierarchy. http://msdn2.microsoft.com/en-us/library/t357fb32.aspx. I'll
post anyway to voice what I consider a problem.
Microsoft - is there a comprehensive list of what's new in 2.0?
You have breaking changes on the msdn framework site, but nothing else
as far as I can see. I cant believe such a thing doesn't exist.
p.s. The search on msdn is near useless in my experience - maybe that's
just me. And I find that info is distributed over so many sub-sites
there is little chance of finding something specific via navigation.
The front page on the .Net framwork page has some links to some obscure
blog entries rather than 'What's New' and bug lists. Very frustrating.
This all contributes negatively to the experience of developing with
what is a good framework. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107350
VS 2002 uses .NET 2.0
We have a C++ application that uses the .NET framework. This application is
built using Visual Studio 2002. Everything has been working fine.
The other day we installed Visual Studio 2005 RTM. When running this
application through the VS2002 debugger it starts loading .NET 2.0 assemblies.
I thought VS2002 and VS2005 could be installed side-by-side. Any ideas on
what is going on? Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107347
terrible annoying BUG in VS.NET 2005 with UserControl at DesignTime?!
Hi,
I'm getting a really terrible and anoying bug/problem in VS.NET 2005:
1. Create a new Windows Application.
2. Add a new class Class1.
3. Add a usercontrol UserControl1.
4. Add a public instance of Class1 to UserControl1 (with WithEvents):
"Public WithEvents ThisClass As New Class1".
5. Build the Solution, and put an instance of UserControl1 on Form1.
6. Rebuild the Solution, and open the Form1 in the Designer (View Designer)
-> Everything works fine, you can close it and open it again in the designer
as much as you want...
7. Change anything to Form1 in the Designer: for instance make it just a
tiny bit larger. Save the changes, and close the Form1.
-> When you nowwant to open Form1 in the Designer, you get some nasty
exception:
*****************
One or more errors encountered while loading the designer. The errors are
listed below. Some errors can be fixed by rebuilding your project, while
others may require code changes.
The type 'WindowsApplication1.UserControl1' has no field named 'ThisClass'.
Hide Edit
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager
manager, String exceptionText, String helpLink)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager
manager, CodeAssignStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
****************
I noticed it added in the Form1.Designer.vb some lines in the
InitializeComponent():
"Dim Class11 As WindowsApplication1.Class1 = New WindowsApplication1.Class1"
and a little bit further "Me.UserControl11.ThisClass = Class11".
You can't open Form1 in the Designer if you don't remove the second line...
This behaviour doesn't happen if you declare the instance ThisClass as
Private, or without the WithEvents...
But I really would like to have it Public WithEvents. And I can't stand it
that I can't, hehe. Does anybody knows a solution for this? Is this a Bug?
Or is there a rule that a UserControl can't containt Public WithEvents
classes??
Any help, hints, or whatever would be really appreciated!
Thanks a lot in advance,
Pieter Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107344
DLL Config File
hi,
can a DLL use app.config file just like ASP.NET application ? or any idea
how to make DLL is configurable, let say for connection string configuration
may be
Hendri Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107343
How to obtain current user's organization ?
Hi,
I know I can use Environment.UserName to obtain the current user name, but
how can I get his organization too ? These two infos are available when users
install Windows, but it seems to me the framework only provides the former.
Thanks. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107336
How to obtain current user's organization ?
Hi,
I know I can use Environment.UserName to obtain the current user name, but
how can I get his organization too ? These two infos are available when users
install Windows, but it seems to me the framework only provides the former.
Thanks. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107335
trouble with setup.msi and dlls in bin directory
Hi,
I have a vb.net solution 2003 with 2 projects (1 is the interface) and (1 is
a class library). I have created a setup project.
If I put all my dlls and dependency dlls in the application folder of the
file system on target machine everything works fine.
However, I wanted to put all my dll files into a bin directory under the
application directory. I tried this and it did not work. I get an error
saying that dependency files are missing.
Does the framework not look automatically first in the bin directory then in
the app directory, then in the global assembly for referenced assemblies?
How do I get my dlls in the bin direcotory to be found by the application
which is executing from the parent directory directly above it?
Should I even try this?
thanks
Chris Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107329
DirectoryInfo.Exists still returns False after directory created.
In the 1.1 framework, I've come across some peculiar behaviour in
DirectoryInfo.Exists. If you create a DirectoryInfo for a directory that
doesn't exist, DirectoryInfo.Exists correctly returns False. However, if you
then call DirectoryInfo.Create to create the directory, DirectoryInfo.Exists
still returns False even though the directory has been successfully created.
This is a little counterintuitive to say the least.
The following code:
string test = @"C:\test";
if (Directory.Exists(test))
{
Directory.Delete(test, true /*recursive*/);
}
Console.WriteLine("Directory.Exists(test): {0}",
Directory.Exists(test));
DirectoryInfo info = new DirectoryInfo(test);
Console.WriteLine("info.Exists: {0}", info.Exists);
Console.WriteLine("info.Create();");
info.Create();
Console.WriteLine("info.Exists: {0}", info.Exists);
Console.WriteLine("Directory.Exists(test): {0}",
Directory.Exists(test));
produces this output:
Directory.Exists(test): False
info.Exists: False
info.Create();
info.Exists: False
Directory.Exists(test): True
It seems to me that this is, well, wrong, isn't it?
Phil Rodgers Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107316
Error 1053: The service did not respond to the start or control request in a timely fashion
Dear .NET Developers,
I encountered the following error message when tyring to start a custom
developed service: Error 1053: The service did not respond to the start or
control request in a timely fashion. I managed to install the service with
installutil.exe, but I cannot get it started. Microsoft's KB suggests to
install .NET Framework 1.1 SP1, but I already have it. This problem occurs
only on the production machine, the service runs on the development server.
Do you have any suggestions? Thanks in advance,
Burak Kadirbeyoglu Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107311
DLL Main()
When you build an exe application, you can count on that the "static void
Main()" function will bee the first one to be called when the application
starts up.
Is there something similar for dlls? Is there a "Main" entry point that is
called when the dll is first loaded?
Thanks. Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107306
gui guidelines
Hi,
is there a guide for windows user interface somewhere?
Thanks Tag: VS2005 Sync Solution Explorer w/ Active File in Text Editor Tag: 107305
Is there a way to sync the solution explorer with the currently active file
in the text editor in VS 2005? (happened by default in 2002/3)