|
Hi Paul,
Having this pipeline from Web Service -> Windows Service -> Database and back forces you to write (and debug) a lot of soap and remoting stuff (from outside to the WebSvc and back, from the ASP.NET Web Service to the Windows Service (remoting) and vice versa.
Consider the following approach:
Windows UI/Console client [*remoted]
|
Windows Service
|
v
Internet <---> ASP.NET <--> Busines Logic DLL <--> Database
^
|
Windows UI/Console client [*simple]
This way you can concentrate on core functionality by developing the Busines Logic Class Library and add all kinds of connectivity afterwards.
greetings,
Gertjan Schuurmans
Amsterdam
The Netherlands
|
|
|
|
|
I'd like a "BetaExpiration" attribute (DECLARITIVE security) on my classes that is enforced automatically when the assembly containing the classes is used. A security exception should be thrown if the classes are being used outside beta period.
[AllowedUse(From = "2003-1-30")]
public class x
{
public x()
{}
}
CodeAccessSecurity permission is the way to do it and I've already got an test implementation. The major problem is that my custom CodeAccessSecurity derived permission assembly should be registered on the user's machine using CasPol etc for the .Net security system to find and use it. This is not desirable. The app should just be installed and my custom codesecurity access should be enforced...
Another way is implement another custom permissing, implement IPermission, ISecurityEncodable. Unfortunately, the declarative notation is never instantiated, unless I do it myself in code; the imparative method is working fine, but I'd like to use attributes for this!
public x()
{
AllowedUse2 au = new AllowedUse2();
au.From = "2003-1-30";
au.Demand();
}
Does anyone have a bright idea how to enforce custom CodeAccessSecurity using declarative notation without requiring .Net registration of the permission assembly?
Victor
|
|
|
|
|
Never mind, I thought of a solution.
VictorV
|
|
|
|
|
On many newsgroups/forums have I repeatedly seen the question: "How do I bind a TreeView to a datasource?" Now, I'm attempting to create a DataTreeView by inheriting from TreeView and providing complex data-binding, but have run into many design issues. I have seen several solutions, such as the ones here:
http://msdn.microsoft.com/library/en-us/dnwinforms/html/custcntrlsamp3.asp#custcntrlsamp3_download
http://www.abderaware.com/WhitePapers/datatreeview.htm
However, the problem with all these solutions (and many other things .NET) is their exclusive focus on DataSets. I'm trying to create a more versatile control that can additionally support actual tree structures, lists of lists, or any other class.
One solution I considered - specifying a DisplayMember/ValueMember/ChildCollectionMember for the control - limits you to using a single type throughout the entire tree (or at least all types with the same display/value/children property names).
Another solution requires ITreeNode and ITreeNodeCollection interfaces to be implemented by the data source. For existing classes like the DataSet, this means either re-implementation or ITreeNode/Collection "adapter" classes. This is the best I've come up with, but I'm wondering if anybody can provide me with some more insight and/or has already done this (since a databound TreeView is one of the more sought-after controls). Or better yet, have an article that discusses how to accomplish this on the site.
What? Were you expecting something witty or funny here?
|
|
|
|
|
Hi all, I was wondering if anyone out there had tried using .NET objects from a pre-.NET scripting environment (I want to use Windows Script hosted JScript). I'm sure it is possible through COM interop, but can anyone tell me of an article or web page to get this running quickly and easily?
Thanks for any suggestions,
Nick
|
|
|
|
|
You can call a .NET component from the outside world. That's done through CCW, COM Callable wrapper, which is by the way the keyword to use to find articles on Cp, MSDN, ...
The procedure is as follows :
- write a component using C#, or whatever .NET language you can think of
- register the component to the unmanaged world using the regasm.exe cmdline. Doing so, this component looks like a standard COM component, except the fact that the InProcServer32/LocalServer32 registry key points to mscoree.dll instead (that's the CLR entry point).
- use JScript to create an instance of this object. Here is how you create COM instances :
var ExcelSheet;
ExcelApp = new ActiveXObject("Excel.Application");
ExcelSheet = new ActiveXObject("Excel.Sheet");
ExcelSheet.Application.Visible = true;
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
ExcelSheet.SaveAs("C:\\TEST.XLS");
ExcelSheet.Application.Quit();
A useful link[^] on MSDN.
|
|
|
|
|
Thanks, I looked around for a while but unless you know a couple of 'magic keywords' like CCW its pretty hard to search for anything containing .NET and JScript. Thanks again, there are a world of cool possibilities for this stuff
|
|
|
|
|
Does anyone know if there are .Net file exists/delete methods that will handle wildcards? File.Exist and File.Delete do not. Thankyou!!
Lorne
|
|
|
|
|
|
Hello,
I've got a C# windows app and I'd like to keep the resources in a centralized place so I've added a resx file to my project where I store all my english strings. This is I guess what they call an embedded resource. My question is, can I add another resx file to hold my german strings and embed it into the same assembly? If so, can anyone pls outline how to do that?
Thanks in advance. Any help is highly appreceated.
Matthias
In theory, there is no difference between theory and practice. In practice, however, there is.
(unknown author)
|
|
|
|
|
Matthias Steinbart wrote:
embed it into the same assembly
Although it's probably doable, I don't recommend it. It's part of the usefulness of assemblies to have a culture attached to them (AssemblyInfo.cs file). Typically you provide an assembly for each supported culture, and doing so the run-time automatically loads the appropriate assembly. This saves you time, effort, plumbering, and... bugs.
|
|
|
|
|
Hi all,
What is the easiest way to tell if a computer has the .NET Framework installed? The more non-technical the better. Is it the same for each OS or are there different methods?
Thanks in advance
Andy
|
|
|
|
|
presence of <winsysdir>mscoree.dll (the entry point of the CLR).
Also read the registry to check out the current version (HKLM\Software\Microsoft\.NETframework).
|
|
|
|
|
Hi ,
I can't run ASP.NET Applications or SOAP apps on my PC.
I have WIN2K PRO SP3 w/ IIS installed ..
Here is the error msg I get when i run my apps ..
Compiler Error Message: CS0013: Unexpected error writing metadata to file 'C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files\webapplication2222\df162b42\f1bc067\tvjmw6ty.dll' -- 'The directory name is invalid. '
( It looks like a file not a directory name .. ) .. ??
ANYONE ???
|
|
|
|
|
See if you have both C: free diskspace and if the ASPNET user have writing rights on the specified folder.
Other thing you could try is see if the directory C:\WINNT\Microsoft.NET\Framework\v1.0.3705\Temporary ASP.NET Files exists.
The 3rd thing to try is running C:\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis.exe
The last thing to try is suicide
I see dumb people
|
|
|
|
|
Tried all those things: nothing worked.
Even tried re-install .NET/VS.NET ..Didn't work..
Re-install IIS .. didn't work ..
Any other ideas ???
I'm wondering if its because my system is UP TO DATE ..
mmmmmm
|
|
|
|
|
I got it fixed... Even a re-install won't fix it..
What you have to do is go to control Panel, Select Add/Remove Programs and when the .NET screen comes up select REPAIR and that will work. Apparently it forces the regirstration of some DLLs or something ..
But it is funny that a re-install doesn't work ..
hehe .
thks .
Dato .
|
|
|
|
|
Hi,
I have installed .NET Beta 2, version v.1.0.2914 on my computer.
Trying to UnInstall the .Net raises an error "Setup cannot read/write to System Registry".
I want to install an SDK framework and I need to uninstal first the above but cannot.
Can you help me here?
Thanks
|
|
|
|
|
garfild wrote:
I have installed .NET Beta 2, version v.1.0.2914 on my computer.
Trying to UnInstall the .Net raises an error "Setup cannot read/write to System Registry".
I want to install an SDK framework and I need to uninstal first the above but cannot.
Can you help me here?
We had a problem at work with either beta 1 or 2, I can't remember. It was just on a test machine so we wiped it clean and did the re-install.
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
I have only been looking at the articles posted for .NET for a short time. There are some very usefull articles and complete components. Does anyone have any comments or thoughts on starting a CodeProject namespace and bringing together the code into one place? This would reduce the possible duplication and help developers using the code........
Am I barking up the wrong tree?
|
|
|
|
|
|
I take your point .......but from small beginnings......?
|
|
|
|
|
That would be a cool idea if the code centered around one mega-application.
What sought of examples are you thinking of, Charlie?
namespace CodeProject.ArticleSection.ArticleShortName.Module ?
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
my svg article
|
|
|
|
|
Simon,
I was thinking along the lines of mimicking the .NET runtime structure, MS have done all the hard work so why not copy it.....
CodeProject.System.Windows.Forms......
etc.....
I was looking for balloon code and there are 2 good examples (Peter Rilling, Rama Kirshna). There is one aspect to the code project of learning and the other of simply reusing code directly. I spent some time looking at each and wondered why not have a general namespace \ project that people can contribute to so to prevent duplication. Each ballon article has benefits but consumers of the code are left pondering....
The 'code project' .NET area could easily be a definitive runtime available to all.......
Your thoughts..?
Charlie
|
|
|
|
|