|
Gregory.Gadow wrote: (allegedly) installed, but they've never shown up in the Services panel
It sounds like they didn't get installed. Did they run?
As far as I'm concerned, the template is very limited and only useful as a starting point for your first Service. After that, you should have your own classes that you use as a basis for more Services. Bear in mind that Windows Services is a very broad topic with many correct techniques for implementation -- the template can't cover them all, so it covers none.
Once you have your own preferred implementation technique (using a Timer, a Thread/sleep, etc.) you should write base classes that encapsulate it and never go back to the template.
|
|
|
|
|
PIEBALDconsult wrote: Gregory.Gadow wrote:
(allegedly) installed, but they've never shown up in the Services panel
It sounds like they didn't get installed. Did they run?
Nope; I could not get them to show up in the Services list. By "installed," I mean that I right clicked on the installation project in the solution and selected "Install" from the menu. This not working might be a function of having Standard rather than Professional VS 2008, I don't know.
|
|
|
|
|
Gregory.Gadow wrote: right clicked on the installation project in the solution
WTF! Try using INSTALLUTIL like a real man.
|
|
|
|
|
Yeah, what he said.
In fact you don't need Visual Studio at all; you can use <your preferred text editor> and the command-line compiler. Because Windows Services have no GUI there's nothing visual to design so VS is overkill.
P.S. Last spring I used VS 2010 Express to develop a little app that involved a WCF Web Service hosted inside a Windows Service.
|
|
|
|
|
hi All,
i am stuck with a problem with custom forms.
i m new to exchange server and may sound naive at times.
the problem is that i have modified the UIextension.xml file to add a Navigation bar item named as "MY Application" and on its click i want my custom form to be opened.
for this i have made a folder for my testform in the forms folder.
the testform will do nothing initially except printing some hello world stuff.
i have added a registry.xml file in that folder as well.
the registry and UIExtension entries are as follows
UIExtension File
<?xml version="1.0" encoding="UTF-8" ?>
<OWAUICustomizations>
<SmallIconMappings>
<!--You can register your own icons for custom message classes here-->
<!--Default IconFlag="Default"-->
<!--Default PrefixMatch="false"-->
<!--Attributes should be in the order of: ItemClass, SmallIcon, IconFlag, PrefixMatch-->
<!-- Sample entry:
<Mapping ItemClass="IPM.CustomClass" SmallIcon="CustomClass.gif" IconFlag="CustomClassRead"/>
-->
</SmallIconMappings>
<MainNavigationBarExtensions>
<!--You can register your own entries to appear in Outlook Web Access navigation bar here-->
<!-- Sample entry -->
<MainNavigationBarEntry LargeIcon="LargeIcon.gif" SmallIcon="SmallIcon.gif" URL="https://myserver/owa/forms/Testform/Default.aspx">
<string language="en-us" text="My Application"/>
</MainNavigationBarEntry>
</MainNavigationBarExtensions>
<NewItemMenuEntries>
<!--You can register your own entries to appear in Outlook Web Access New item menu here-->
<!-- Sample entry
<NewItemMenuEntry ItemType="IPM.CustomClass" Icon="foo.gif">
<string language="en-us" text="New custom item"/>
</NewItemMenuEntry>
-->
</NewItemMenuEntries>
<RightClickMenuExtensions>
<!--You can register your own entries to appear in Outlook Web Access mail view right-click menu here-->
<!-- Sample entry
<RightClickMenuEntry Icon="Icon.gif" URL="http://server/application.aspx" filter="IPM.Foo;IPM.Bar">
<string language="en-us" text="My Application"/>
</RightClickMenuEntry>
-->
</RightClickMenuExtensions>
</OWAUICustomizations>
And Registry.xml File is as follows
<Registry xmlns="http://schemas.microsoft.com/exchange/2004/02/formsregistry.xsd" Name="PremiumExtensions" InheritsFrom="Premium" IsRichClient="true">
<Experience Name="Premium">
<Client Application="MSIE" MinimumVersion="7" Platform="Windows NT" />
<Client Application="MSIE" MinimumVersion="7" Platform="Windows 2000" />
<Client Application="MSIE" MinimumVersion="7" Platform="Windows 98; Win 9x 4.90" />
<Client Application="Safari" MinimumVersion="3" Platform="Macintosh" />
<Client Application="Firefox" MinimumVersion="3" Platform="Windows NT" />
<Client Application="Firefox" MinimumVersion="3" Platform="Windows 2000" />
<Client Application="Firefox" MinimumVersion="3" Platform="Windows 98; Win 9x 4.90" />
<Client Application="Firefox" MinimumVersion="3" Platform="Macintosh" />
<Client Application="Firefox" MinimumVersion="3" Platform="Linux" />
<Client Application="Chrome" MinimumVersion="1" Platform="Windows NT" />
<ApplicationElement Name="Item">
<ElementClass Value="IPM.Contact._Default">
<Mapping Form="https://myserver/owa/forms/Testform/Default.aspx"/>
</ElementClass>
</ApplicationElement>
<ApplicationElement Name="PreFormAction">
<!-- Add this one generic entry for your custom message class, and everything will work
<ElementClass Value="IPM.Contact._Default">
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="Preview"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="Reply"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="ReplyAll"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="Forward"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>
<Mapping Action="New"
Form="Microsoft.Exchange.Clients.Owa.Premium.Controls.CustomFormRedirectPreFormAction,Microsoft.Exchange.Clients.Owa"/>"/>
</ElementClass>
-->
</ApplicationElement>
</Experience>
</Registry>
Please let me know how can i open the default.aspx page in Testform folder on click of MyApplication navigation Menu.
rite now with these enteries i m getting the following error
Exception
Exception type: System.Web.HttpParseException
Exception message: Could not load type '_Default"'.
|
|
|
|
|
Are you sure this relates to the .NET framework? It looks more like ASP.NET[^] to me.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
i haven't seen the category for the Exchange Server hence posted on this category.
|
|
|
|
|
Dear sir,
I have created controls dynamically and the controls are inside the table and the table inside the div.Im getting error in mozilla browser..
The sample html generated code is shown below
<div id=divall runat="server">
sdfssdf | <select id=dd1>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
</select>
| sdfssdf | <select id=dd1>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
</select>
| sdfssdf | <select id=dd1>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
<option value="1">sdfsd</option>
</select>
|
I access the value as below
var divall = document.getElementById('divall');
//for getting all the controls inside the div
var allcntr = divall.childNodes[0].childNodes[0].childNodes;
for(var i=0;i<allcntr.length;i++)>
{
//for getting all the dropdownlist's value inside the table
var cmball=divall.childNodes[0].childNodes[0].childNodes[i].getElementsByTagName('OPTION');
for(var j=0;j<cmball.length;j++)>
{
if(cmball[j].selected)
{
//some code
}
}
}
//
divall.childNodes[0].childNodes[0].childNodes;
The above code is working 5n in IE but not in mozilla.
Is there any common code(compatible to all browsers mainly IE & Mozilla) to access the childnodes?
Thanx for your help in advance..
T.Balaji
|
|
|
|
|
And this has what to do with the .NET Framework??
Ask this in the Web Developement forum.
|
|
|
|
|
Well i had read in the w3schools.com that there is a small issue in accessing the childnodes.
balaji.t wrote: divall.childNodes[0].childNodes[0].childNodes;
This works fine in IE but not in Firefox.
The reason which i am not completely sure is that IE accesses with '0' index and '1' in Firefox.
So just try by using 1 instead of 0 for accessing.
|
|
|
|
|
Hi,
I am struggling to find any information on what I would have thought would have been a very easy thing to do. Does anyone know how to get hold of the values below, which are listed in the AssemblyInfo.cs file?
[assembly: AssemblyVersion( "0.0.0.0" )]
[assembly: AssemblyFileVersion( "0.0.0.0" )]
[assembly: AssemblyInformationalVersion( "0.0.0" )]
Any help or pointers to useful info would be very much appreciated.
Best wishes, Patrick
|
|
|
|
|
This[^] might help.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
That got me there. Thank you.
- Patrick
|
|
|
|
|
Hi guys i try to write a simpale server client appliaction. server transmit the file content to client and recieve an acknowledgment which is a "ok" string. i have some problem in my code.
using (NetworkStrem ns = new NetworkStream(client))
{
using (BinaryReader br = new BinaryReader(File.OpenRead(filepath)))
{
while (sent < file.Length)
{
data = new byte[20];
br.Read(data, 0, data.Length);
tempData = data;
ns.Write(data, 0, data.Length);
ns.Flush();
ns.Read(data, 0, data.Length);
ack = Encoding.ASCII.GetString(data);
while (ack != "ok")
{
ns.Write(tempData, 0, tempData.Length);
ns.Flush();
ns.Read(data, 0, data.Length);
ack = Encoding.ASCII.GetString(data);
}
sent += 20;
ack = string.Empty;
}
}
what'wrong here i dont know if u know tell me
Thanks in advance
|
|
|
|
|
What are the problems? Are you getting an error - if so edit your question and post the error.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
using (NetworkStrem ns = new NetworkStream(client))
{
using (BinaryReader br = new BinaryReader(File.OpenRead(filepath)))
{
while (sent < file.Length)
{
data = new byte[20];
br.Read(data, 0, data.Length);
tempData = data;
ns.Write(data, 0, data.Length);
ns.Flush();
ns.Read(data, 0, data.Length);
ack = Encoding.ASCII.GetString(data);
while (ack != "ok")
{
ns.Write(tempData, 0, tempData.Length);
ns.Flush();
ns.Read(data, 0, data.Length);
ack = Encoding.ASCII.GetString(data);
}
sent += 20;
ack = string.Empty;
}
}
|
|
|
|
|
ganesh_IT wrote: br.Read(data, 0, data.Length);
I don't understand your message, however I can tell you a Read method returns an integer, i.e. the number of bytes read. Not using that information is a mistake, as there may be less than data.Length, in which case you are processing too much data later on (as in your write).
|
|
|
|
|
If you are using TCP/IP you do not need to send acknowledgments. TCP/IP is a guaranteed, in-order protocol and .NET will throw an exception if it fails. If you want to keep the connection active set the keep alive flag.
Oh, and, if you are using UDP sending an ack is self defeating.
|
|
|
|
|
Hi )
Sorry for my English (
I hope you can help me with this:
We created 1000+ tests in our solution. The problem is that they can't be run all in one batch - VSTestHost process simply dies with System.OutOfMemoryException. That's because it is 32 bit process and when it exceeds 2GB it dies. Ok.. Now the question is why is it happens?
I've tried to profile testlist with 3-4 tests with JetBrains in order to find memory leaks. By the way - did anyone do such thing? I've created .bat-file with MsTest.exe. Then in [TestInitialize()] i've added MessageBox.Show("Start"); and began to make snapshots when this dialogbox appeared. The magic is that there are no memory leaks(+2000 bytes - almost no), but also there are no our classes. So, obviously, what I do to find memory leaks is wrong. I see that VSTestHost process eats a lot of memory with each passing test. Even 50 tests kills process with Memory exception.
So did anyone encountered such problem? And how to profile VsTestHost on memory leaks?
Maybe you can advise me where can I post this message to get an answer?
modified on Tuesday, November 16, 2010 2:08 AM
|
|
|
|
|
As with all memory issues it could be a trillion different things (that's a scientific fact ). I'm guessing it's got to do with your SetUp/TearDown process - can you post a small sample of your test harness code? I think the SetUp/TearDown for the whole harness, the per-test SetUp/TearDowns and also at least one test should be enough to figure something out.
Is it the SUT that's causing this? Wild guess: static collections/instances that are constantly being added to by your tests and therefore the GC never disposes because the SUT still has references to it?
I dunno, as I said, I think a little code may help your question get answered.
|
|
|
|
|
Sure. Here it is:
[TestClass]
public class SS_Identity_Types_Edit_Tests : TestsVS
{
SS_Identity_Types_FullEdit_Form view = null;
[TestInitialize] public override void RunBeforeAllTests()
{
base.RunBeforeAllTests();
view = new SS_Identity_Types_FullEdit_Form(this.basicWindow.DS);
PrepareEditForm(view, GetNamedContextOrCreate("SS_Identity_Types", false), false);
view.IsRunLoadActions = false;
view.Visible = true;
view.Visible = false;
}
[TestMethod] public void TestPrerequisites()
{
Assert.IsNotNull(view);
}
[TestCleanup] public override void RunAfterAllTests()
{
view.Close();
view = null;
base.RunAfterAllTests ();
}
}
it inherits from sthm like this:
[TestInitialize()]
public virtual void RunBeforeAllTests()
{
basicWindow = DoCreateMainWindow();
DoActionsOnLoad();
basicWindow.LoadDataFromDataBase();
}
[ClassCleanup]
public static void ClassCleanup()
{
}
[TestCleanup()]
public virtual void RunAfterAllTests()
{
InvokePrivateMethod(basicWindow, new object[] { new EventArgs() }, "OnClosed");
this.basicWindow.Close();
this.basicWindow = null;
}
I'm pretty sure there are leaks, but I can't get how to find them. As i've said JetBrains attached to test process doesn't show my classes, so, obviousely, I do sthm wrong in my profiling.
|
|
|
|
|
Hello guys,
The developers of GData (YouTube API) don't reply, so I hope somebody from cp can help me.
I am trying to upload a video to YouTube using their API with private proxy. I always get 403 forbidden error.
If I removed the proxy, and upload normally, it works fine.
I tested the proxy with Firefox and it uploads correctly (from their web interface... youtube.com), but in my app ... well it does not work. The proxy is valid (tested with myip.com and it tells the proxy IP).
The source code of the YouTube uploader is here: http://www.sodevrom.net/TestUpload.zip
Open the sln (Visual STudio 2010 C# .net) and in the form class, double click on the button and edit your username/password/developer key.
After that, simply run the app and press the upload button. You will see that it fails
If you go to DownloadYouTube.cs file and remove the proxy (simply comment the liens from the constructor) you will see that it works.
What can be the problem ? How can this be solved?
Hope somebody has experience with this and can help me.
Thanks!
Vlad
|
|
|
|
|
Can I mash up C# (Windows Forms) with Java code. Can you give me examples of what' s possible and most important practical with both combined?
|
|
|
|
|
I think this[^] may be what you are looking for.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Well this is really nice, but paid.
modified on Wednesday, November 10, 2010 3:39 PM
|
|
|
|