Author |
|
kazmax Newbie
Joined: 19 February 2006 Location: United Kingdom
Online Status: Offline Posts: 8
|
Posted: 24 March 2006 at 5:42am | IP Logged
|
|
|
I just purchased MailBee.net.POP3, and I am having difficulty understanding where to put the license key to make this a registered installation. As a result I am unable to use this component.
I evaluated the standard MailBee.POP3 component which worked fine during evaluation. However setting the license key for the .NET version seems a bit different!
When I try to set the license key from within a class I get an error "Access of shared member (...) through an instance. Qualifying expression will not be evaluated".
This is within an instantiated class of a Windows service, .NET version 2. So I cannot apparently set the license key programmatically.
The help provided with this component suggests this value can be set in the XML configuration file. Only problem is that the example given isn't representative of the structure of this file, so I'm not clear where exactly to put this.
This seemed much easier with the MailBee.POP3 component :)
Andrew
|
Back to Top |
|
|
kazmax Newbie
Joined: 19 February 2006 Location: United Kingdom
Online Status: Offline Posts: 8
|
Posted: 24 March 2006 at 5:59am | IP Logged
|
|
|
My application configuration file is defined as follows (replace license key with valid key):
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="MailBee.Pop3Mail.Pop3.LicenseKey" value="My license key"/>
</appSettings>
<system.diagnostics>
<sources>
<!-- This section defines the logging configuration for My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Uncomment the below section to write to the Application Event Log -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"/>
<!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
</configuration>
|
|
|
Andrew
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 24 March 2006 at 11:59am | IP Logged
|
|
|
Quote:
When I try to set the license key from within a class I get an error "Access of shared member (...) through an instance. Qualifying expression will not be evaluated".
|
|
|
The license key needs to be specified in the static (Shared in Visual Basic) property
LicenseKey of the component you're going to use (Pop3 in your case):
// Setting the license key using LicenseKey property
MailBee.Pop3Mail.Pop3.LicenseKey = "Your license key";
Please note you should set this property before creating any instances of the licensed component.
Quote:
The help provided with this component suggests this value can be set in the XML configuration file. Only problem is that the example given isn't representative of the structure of this file, so I'm not clear where exactly to put this.
|
|
|
We also checked your "app.config" with your license key and found no problems. You put the license key correctly.
|
Back to Top |
|
|
kazmax Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 24 March 2006 at 1:01pm | IP Logged
|
|
|
This isn't a regular application - it is a Windows service. Where exactly am I supposed to put this license key within a service?
There is no user interface with a service. Whether there might be a shared/static area I don't know - but I did try putting the license key request into the startup function of the service - it didn't want to know.
Neither does it take any notice of the license key being in the config file - I copied that file verbatim from the application directory (less the license key obviously). Did you test this with a Windows service application?
Andrew
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 24 March 2006 at 1:26pm | IP Logged
|
|
|
Quote:
Whether there might be a shared/static area
|
|
|
Shared/static is a term of VB.NET/C# language. It has nothing to do with service applications or any areas within them.
Static method/property is a class member which is only one per class. For example, in VB6, you cannot call a method of MailBee.POP3 class without creating an instance of this class. Thus, if you create many instances of POP3 class, you should set LicenseKey property for each of them. However, in MailBee.NET, you should set .LicenseKey property for the class itself:
Code:
using MailBee;
using MailBee.Pop3;
...
Pop3.LicenseKey = "key";
Pop3 objPop = new Pop3();
...
|
|
|
I.e. you should set .LicenseKey for Pop3 class itself, not for any of its instances. This is called static/shared property.
Quote:
Neither does it take any notice of the license key being in the config file
|
|
|
Are you sure all other settings are read correctly? I.e. MailBee license key is the only field which cannot be retrieved from the config file?
Regards,
Alex
|
Back to Top |
|
|
Andrew McKay Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 25 March 2006 at 3:47am | IP Logged
|
|
|
Okay, I need to revisit my project to try and make sense of why this isn't working. So far your response has not provided the vital clue I need.
Some comments which I hope might be beneficial for you:
1) I can't help thinking you may be damaging your potential sales for this product. There are bound to be many people like me who could struggle to get this working. That's not good in a situation where there is lots of competition - people will just give up and move onto a competitors product. Pity if that happens, I was immediately enthralled by your non-NET products which demonstrated real quality. If I had tried to use the .NET products first I don't doubt I would have walked away and found an alternative product, I just don't have time to play ping-pong with support forums trying to discover how to use this product.
2) Unlike the non-NET components there are no example projects provided with the installation. That's a big pity because if there had been a very simple VB project showing how this is to be used I would have been able to answer my own question without wasting your time.
3) The help is quite good. Only problem is that it hasn't been good enough to get me started. Big question mark there.
4) These .NET components do not work unless the component has a valid license key defined (evaluation or permanent). That's unfortunate because if I could just get this damn project working to collect email I would then have time during the evaluation period to figure out where the problem is. Right now I'm faced with a deadline where our business process isn't working, and unable to proceed.
5) As a suggestion I wonder if it might be viable for you folks to add an additional option for setting the license key, by defining a registry key? I just want this product working, I don't care which method I have to use to get there - right now I purchased a product 2 days ago, got the license key quickly, and the only thing this product is doing currently is taking up real estate on my hard disk - it's useless for any purpose whatsoever until I've cracked this problem.
Andrew
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 25 March 2006 at 7:03am | IP Logged
|
|
|
Thank you for your suggestions. There are indeed no sample projects shipped with MailBee.NET yet. However, we're working on it (along with tutorials, online doc, how-to's, troubleshootings, etc).
Quote:
So far your response has not provided the vital clue I need.
|
|
|
I created a test WindowsService application which sucessfully unlocks MailBee.NET POP3 component in both ways: via Pop3.LicenseKey property and via config file. I emailed you the entire project (it's for VS.NET 2003 but I hope it won't be a problem).
All MailBee-related code (except "using" directives) is in OnStart:
Code:
protected override void OnStart(string[] args)
{
Pop3.LicenseKey = "key";
Pop3 pop = new Pop3();
pop.Log.Enabled = true;
pop.Log.Filename = @"C:\pop3_log.txt";
pop.Log.Clear();
pop.Connect("localhost");
pop.Disconnect();
pop = null;
}
|
|
|
"Pop3.LicenseKey = key" line can be eliminated if the key is in the config file (the config file structure from your second posting will work fine). However, as I also mentioned in the email, the config file name should be "app.config" in the project root, not "appname.exe.config" which is created by VS.NET in debug/release sub-folders of the project from "app.config". If "appname.exe.config" is manually edited, VS.NET will overwrite it.
I hope this helps.
Regards,
Alex
|
Back to Top |
|
|
Andrew McKay Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 26 March 2006 at 7:28am | IP Logged
|
|
|
Thanks for that further information. I think you have most likely just answered what the problem is, I'll find out tomorrow when I go in to my place of work.
I hadn't realised that the config file that needed to be updated was in the project root - I've been trying to update the one in the same folder as the executable, which was clearly not the right thing to do.
Grateful thanks if this does prove to be the problem. I've learnt something important due to this!
Andrew
|
Back to Top |
|
|