|
theory2006 wrote: Does the .NET framework have a License manager ?
No.
theory2006 wrote: OR is worth rolling my own ? - can't be that difficult ?
You have 3 options:
1) Write your own. No, it's probably not that hard to do it to a simple level. Because .net is compiled to IL, any semi competent developer would probably be able to break your protection, but unless your writing a developer tool, most average users wouldn't be able to, and unless you really hit the big time, you probably won't attract the attention of crackers who break it for other people. (and if you do you can deal with improving it in the next version)
2) Buy protection. There are stacks of companies that offer license managers of varying strengths and varying features. Just google for them. Try out a few. Speak with their sales department, and evaluate them.
3) Consider using conditional compilation. You would compile multiple editions of your app that expose different features. it's not possible for the user to crack your app as features you don't want them to use are physically not compiled into the exe. It does mean that to upgrade they would have to download a new version, but unless your app is massive that isn't a real problem. (I wrote an article on it here[^])
Personally, if your just starting out. I'd do either option 1 or option 3. Probably leaning towards option 3 unless you needed to manage lots of different combinations of paid for features at different levels, and want to support dynamic upgrade by just buying a new serial number.
Simon
|
|
|
|
|
Hi,
I am using opennetcf in my Windows CE application.
I declared two threads as below
Private _thrdLineItems As Thread2
Private _thrdUploader As Thread2
and when i write
_thrdLineItems.Sleep(10000)
i get a warning saying that
"Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated."
The compiler is asking me to change _thrdLineItems to Thread2.
Please help me figure out why this is happening and how to resolve it.
Thanks in advance,
Karthik
|
|
|
|
|
Did you instantiate _thrdLineItems before calling Sleep ? In other words, is there a new -statement that creates the thread?
I are troll
|
|
|
|
|
Hi Troll,
Ya i have intiated and started the thread.
karthik
|
|
|
|
|
Thread2.Sleep(10000) Can you give this a try? Source[^]
I are troll
|
|
|
|
|
Thanks much for replying....
Ya would work but i have two threads running.
By writing Thread2.Sleep(10000) i guess the current thread would sleep.
Does it make sense....
Thanks,
Karthik
|
|
|
|
|
The suggestion came from the example on the Microsoft site;
Dim newThread As Thread = New Thread(AddressOf ThreadMethod)
newThread.SetApartmentState(ApartmentState.MTA)
' The following line is ignored since
' ApartmentState can only be set once.
newThread.SetApartmentState(ApartmentState.STA)
Console.WriteLine("ThreadState: {0}, ApartmentState: {1}", _
newThread.ThreadState, newThread.GetApartmentState())
newThread.Start()
' Wait for newThread to start and go to sleep.
Thread.Sleep(300)
Try
' This causes an exception since newThread is sleeping.
newThread.SetApartmentState(ApartmentState.STA)
Catch stateException As ThreadStateException
Console.WriteLine(vbCrLf & "{0} caught:" & vbCrLf & _
"Thread is not In the Unstarted or Running state.", _
stateException.GetType().Name)
Console.WriteLine("ThreadState: {0}, ApartmentState: " & _
"{1}", newThread.ThreadState, newThread.GetApartmentState())
End Try
(Source[^])
It doesn't feel quite logical, as Sleep is a static member. Thread isn't the same thing as Thread2, but I can't see any other differences
I are troll
|
|
|
|
|
thanks for your replies i quite get what that i am trying to do isn't logical as thread2.sleep is static and will always affect the current thread.
Thanks,
Karthik
|
|
|
|
|
Good luck
I are troll
|
|
|
|
|
Hi,
The Thread2.Sleep method is static, puts the current thread to sleep, and cannot be used in the way you were attempting. If you want to put the _thrdLineItems thread to sleep then simply call Thread2.Sleep from inside that thread’s method.
Alan.
|
|
|
|
|
thanks for your replies..... i sure understand what you mean.
Is it possible that in any way i can make a thread sleep from outside its method???
Thanks again,
Karthik
|
|
|
|
|
Hi folks,
I did some test with dataSets and GridViewData and XML. I've this discover this
dataSet1.ReadXml(filePath);
dataGridView1.DataSource = dataSet1;
dataGridView1.DataMember = "Match";
so all the elements and texts under the root element "Match" from my xml file loaded file into dataSet and was able to be output to dataGridView.
Now is there a way for me to select/navigate the type of element/textnodes I want to output base on the XML data i've loaded?
A point to the right direction would be appreciated.
|
|
|
|
|
birdofprey00 wrote: A point to the right direction would be appreciated.
birdofprey00 wrote: dataSet1.ReadXml(filePath);
Assuming dataSet1 is of type DataSet , I recommend studying information and documentation by Microsoft on the DataSet class.
|
|
|
|
|
i have stored the value from a text area into the db..
and i m using repeater to retrieve it...
data is getting retrieved but the formatting is not proper...
if i have stored
hi my name is
priyanshu kumar jha
i m a student
it shows like
hi my name is priyanshu kumar jha i m a student
that is the newline is getting lost..
plz. help me out..
|
|
|
|
|
Can you show us some code where you are using the DataReader?
I are troll
|
|
|
|
|
i m trying 2 get an article written by the user stored in the database... here is it's code
conn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\article.mdf;Integrated Security=True;User Instance=True");
string com;
com = "insert into articles values('priyanshu','" + TextArea1.Value + "','" + t1.Text + "')";
comm = new SqlCommand(com, conn);
try
{
conn.Open();
comm.ExecuteNonQuery();
conn.Close();
}
catch
{
}
than in a page where i m showing the data, this is the code:
<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table border=0 >
<tr><th><font face="stencil" size=7 color=maroon>Articles by the user</th></font></tr>
</HeaderTemplate>
<ItemTemplate>
<tr><td><b><hr /><font face="candara" size=4 color="black"><%# Eval("subject") %></font></td></tr>
<tr><td><font face="candara" size=4 color=silver<%# Eval("article") %><hr /></font></td></tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
the .cs coding is here:
SqlConnection conn;
SqlCommand comm;
SqlDataReader reader;
conn=new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\article.mdf;Integrated Security=True;User Instance=True");
comm = new SqlCommand("select * from articles", conn);
try{
conn.Open();
reader=comm.ExecuteReader();
Repeater1.DataSource=reader;
Repeater1.DataBind();
reader.Close();
conn.Close();
}
plz. help me out with it!!
|
|
|
|
|
You could replace the actual returns with HTML-tags before they enter the database.
com = "insert into articles values('priyanshu','" +
TextArea1.Value.Replace(Environment.NewLine, "<br />") + "','" +
t1.Text.Replace(Environment.NewLine, "<br />") + "')"; That's not a very clean solution though, I'm sure that there are better ways to solving this.
I are troll
|
|
|
|
|
thanks mate...
actually i m an engineering (IT) 4th sem student..
i hav just d basic introduction of asp.net in my curricullum..
i m developing my website and actually i m using asp.net by just referring 2 some e-books dat i hav..
i don have d basics clear therefore there is such a problem
anyhow, thanx 4 d help..
i wud surely require more help in near future
thanx
priyanshu
|
|
|
|
|
dim reader as sqlDataReader
dim cmd as sqlDataCommand
cmd = new salDataCommand("Select SQL",con)
reader = cmd.executeReader
while reader.read()
textBox1.text=reader("Colomn Name").toString()
end while
lyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambodia
lyrithyforcambodialyrithyforcambodia
lyrithyforcambo.
|
|
|
|
|
I'm trying to trigger a hibernate event in Windows Service in
DotNet 2.0.But surprisingly it seems it can't when Windows goes into the hibernate state.Is there an approach to do this.
Any help will be appreciated!
|
|
|
|
|
First let me say that I have no experience with hibernate events so what I am about to say is all theoretical "what if".
Hibernate events are all about user sessions. Services are not about user sessions and therefore it may no make sense to be concerned with them from a pure definition of services. That is my first thought or theory regarding your stated problem. As I said that could be completely wrong.
That said there a many implementations of Services that, on occasion, require User Session consideration(s).
In general Best Practice for that situation is to add a User Session process to your system. This is most often done in the form of a System Tray Process but does not need to be. Then you can use an appropriate (for your requirements) form of IPC to communicate between the two processes.
|
|
|
|
|
Very Welcome to my Question.
I want to use sqlite database engine...
I am having dll file of System.data.sqlite.dll
I have added reference of this file to myapplication.
I want to install or register it to the my Global assembly cache..
When i try to install or compile my System.data.sqlite.dll assembly it
shows error "Invalid Assembly file"
Is anything else required to sqlite Use Database engine ?? ??
Thank in advance.
|
|
|
|
|
Is it signed? Assemblies in GAC must be signed with key (hash), so they are unique (name + version + hash).
|
|
|
|
|
I'am developing an application that works similar to web browser.
A browser first downloads HTML, and having read this single file it downloads files that are pointed in this HTML file. This causes that many requests to the same server may be performed (alongside with requests to other web servers , but it is irrelevant here)
I assume that web browsers generally do not open new TCP connection to the web server for each file they need to download. Instead (if all resources are located on the same web server) a single connection is established, and this TCP endpoint is used for all subsequent files retrieved using HTTP protocol. (A browser might also want to multi-thread the whole-download operation, however it is not the case that there are created as many threads (and each with its own TCP connection) as resources to be downloaded).
The first question is: is the above assumption true ?
If it is true, the second question is:
How am i supposed to achieve reusing TCP connection when using HttpWebRequest / HttpWebResponse ?
in other words: how to avoid establishing a new TCP connection (for each file to be downloaded) when downloading many small files from this server. The signatures of WebRequest do not expose anything that I might assume to be usefull in this very scenario (many files to download).
And the third question is: maybe these classes are already smart enough to cache TCP connection for some time in order to optimize the whole process (internally reuse existing TCP connections) ?
thanks for help
Michal
|
|
|
|
|
ok, I've learned that underneath TCP connections are reused whenever possible.
Thanks,
Michal
|
|
|
|