|
Hi,
for my web application, i need to unzip my zip file on server through code. any one help to me.
thanks in advance.
Murali.M
|
|
|
|
|
The guys from #develop have created a nice .Net zip libray, see icsharpcode.net for a download.
The graveyards are filled with indispensible men.
|
|
|
|
|
Hi,
thanks for ur help
Have A Nice Day
|
|
|
|
|
I have a software package that gets installed on a local sql server and the customer can run as many clients as they need. What I need to be able to do is license the package by securing the sql server. For each "sub-office" there should be a license. Each sub-office has its own database on the sql server.
I know that this isn't the right forum. I just though maybe I can get a quick answer since this one has a larger audience. If anything I can implement a custom solution not based on the sql server. Suggestions welcomed.
|
|
|
|
|
So basically you want to license the database itself? We have a similar setup with our flagship product where a single database manages the accounts that can access each of the company databases (or sub-office database in your case). Similar to you, we allow unlimited user accounts. You could even forego this and just use Windows Authentication using SSPI. The thing that maintains how many people can access each database at a time is a .NET Remoting object that caches the current license count for each company (just in case the Remoting object shuts down or something). It hands out licenses and takes care of decrementing those counts when a client disconnects. The latter part is problematic, however, since if your client application crashes there's not really any good way to decrement the count since the clean-up code didn't run. If you don't have to expose your Remoting object through IIS in order to hang-off port 80, you could always poll clients by implementing your own ILease and returning that in GetLifetimeService .
As far as limiting connections in SQL Server, all you can do is limit licenses for a SQL Server instance, but that's nothing that a DBO couldn't change.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Awesome! That is exactly what I was thinking about doing.
One little question. I have my clients automatically find the sql server (multiple sql servers are possible also, I do searching using SQLDMO.ListAvailableSQLServers). What would be the best way of storing the URI? I was thinking maybe store it on the SQL database and have the client look it up. It URI doesn't work or license check fails then client will shutdown.
|
|
|
|
|
Sounds like a good idea. That way, you wouldn't have to worry about clients configuring two different properties - one for the SQL Server connection string and one for the Remoting object URI.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi
I would really appreciate it if anybody can help me!! I must convert a HTML page ..images include into a PDF file and stream the PDF file into a DB.
I have searched the net without any real success.
Thanks
Regardt
Africa is a though country
--"Hello daar vir die Afrikaans sprekende"--
|
|
|
|
|
You have to split this up into two part. First convert then encode and send to server.
Take a look at this site: http://www.verypdf.com/ and see PDFcamp/PDFwriter - it looks like this is the least expensive way of converting html to pdf. If you are looking for more pro components then around at: www.pdfstore.com (Some of the prices out there are scare if you are a startup and dont have much money.)
To put the pdf in database just read the file in and use Convert.ToBase64String() and send it to the database.
|
|
|
|
|
You could also - depending on the RDBMS - store the PDF as a binary stream, which some ADO.NET classes (like those in System.Data.SqlClient ) support. IMO, you should store the PDF on the filesystem and either store the path in the DB or use the primary key as part of the filename, which is what we do in our flagship product.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I'm using the ".NET Configuration Tool" to change the properties of the permissions belongin' to various permission sets. This can be done using the "Properties" dialog available for any built-in permission.
Is there any way to provide such a dialog for a custom permission, a CodeAccessPermission-derived class? The default displays a message like "The Custom Permission is unrestricted", or an xml fragment
rechi
|
|
|
|
|
The mscorcfg.dll assembly for the Microsoft .NET Framework Configuration snap-in is hard-coded to display views and property pages for the built-in permission classes and all the abstract classes are marked private . There is nothing in the .NET base class library for this either, unfortunately. You could take a look at the aforementioned assembly to see if there's any other hooks or interfaces, but it doesn't appear to have any.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
|
If I open a form with a axwebbrowser-control in a mdi-container
and show an excel-sheet in the webcontrol, than close the form
and application, the excel-process leaves alive.
If I close the application without closing the form first
excel closes.
Help appreciated.
Litzi
|
|
|
|
|
Excel was closed when I used axWebBrowser1.Dispose()
in the closing event from the form
Litzi
|
|
|
|
|
Hello Gurus,
I am using Environment.GetEnvironmentVariable() method to retreive a value from a an defined environment variable in a Win2k machine.
This method is able to get the value from a console application mode. However, if I run my application in a window service mode. It fail to get any value from the same defined environment variable.
Is there any setting I need to perform? Any suggestion, please advise. Thanks.
|
|
|
|
|
maybe your service runs in an other environment (other user)
try to get for example >ver<
Litzi
|
|
|
|
|
The environment variable has to be a system environment variable, or a user environment variable for the user that the service runs as. Adding environment variables from the command-line are also only valid for that instance of the command line, or any programs started from the command line. To configure persistent, global environment variables, go to the Advanced tab of your System Properties (right-click on My Computer and select Properties) and click the Environment Variables button (or similar). You'll see sections for both user and system environment variables there.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hello all,
Thanks for your advise. The problem solved. Thanks.
|
|
|
|
|
is there something like:
#if theCompilerVersionIs1.0
using Microsoft.Data.Odbc;
#else
using System.Data.Odbc;
??
I have VS2002 and have to command line compile for 1.1 and it would be great not to change my code for this.
|
|
|
|
|
There is preproc conditions supported by the C# compiler, yes, but there is no such definitions provided by the compiler that are documented, so you'll have to pass them yourself using /d:SYMBOL or configuring additional symbols in your VS.NET project (go to project properties, expand Configuration Properties, click on Build, and add symbols to the Conditional Compilation Constants at the top). An example follows:
#if CSC10
using Microsoft.Data.Odbc;
#else
using System.Data.Odbc;
#endif
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
does anyone know how to implement drag drop events in native windows? there doesn't seem to be any WM_DRAGDROP message!
related question, are the dotnet drag drop events into a control implemented by some object or code library that is accessible?
TIA!
________________________________________
Gosh, it would be awful pleas'n, to reason out the reason, for things I can't explain.
Then perhaps I'd deserve ya, and be even worthy of ya..
if I only had a brain!
|
|
|
|
|
Drag and drop is not trivial to implement. .NET exposes this in a rather easy-to-use method that encapsulates all the native functions, interfaces, structs, and enums/constants. As you can see, though, not every control in .NET supports drag and drop, either. There is a lot that has to be done in order to do this for native windows. There is more documentation in the Platform SDK at http://msdn.microsoft.com/library/en-us/dnanchor/html/anch_WinShell.asp[^]. Specific interfaces and functions to look at are IDropSource , IDropTarget , IDataOject , and DoDragDrop . These are all from the Platform SDK, not the .NET Framework SDK (I only mentioned because a couple of these have similarly named equivalents in both). Those four interfaces and functions - along with the documentation about them - should be enough to get you started.
On a side note, so long as the clipboard formats are supported by both the drag source and the drop target - regardless whether either one is managed or native - and the data is formatted correctly you can drag and drop between windows.
Finally, if you are looking to add drag-n-drop support to your native Windows, first read about the Windows Shell and drag-n-drop interfaces from the link I gave you and continue in the Visual C++ or ATL/WTL/STL forum.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath, thank you for the great references (as usual!).
________________________________________
Gosh, it would be awful pleas'n, to reason out the reason, for things I can't explain.
Then perhaps I'd deserve ya, and be even worthy of ya..
if I only had a brain!
|
|
|
|
|
Hello,
I would like to improve my application; hope it can minimize to system tray, and appear again if double clicked on system tray icon.
I know I should use notify icon, but how can I catch the minimize event of my application and tell it to minimize to system tray?
I just hope to find a good example of using notify icon, could any one help and teach me?
Thank you
|
|
|
|