.net

C# .NET app's product version not updating in Control Panel -> Program -> Uninstall a program

时光毁灭记忆、已成空白 提交于 2021-02-05 11:05:27
问题 I'm having trouble updating a C# application's product number. I updated the [assembly: AssemblyVersion("0.0.4.4")] and [assembly: AssemblyFileVersion("0.0.4.4")] in AssemblyInfo.cs. Then build a new MSI setup file. Then I proceed with uninstalling & installing the new version of the app. However, in Control Panel's Uninstall a program, my app keeps showing its product version as 0.4.3. Meanwhile, right-click & bring up properties of the app's EXE file shows the correct version number (4.4).

How to play a WPF Sound File resource

折月煮酒 提交于 2021-02-05 11:03:09
问题 I am trying to play a sound file in my WPF application. Currently I have the following call: private void PlaySound(string uriPath) { Uri uri = new Uri(@"pack://application:,,,/Media/movepoint.wav"); var player = new MediaPlayer(); player.Open(uri); player.Play(); } Now if I specify Media/movepoint.wav as build action Content and load it as a relative or absolute file path it works fine, so I suspect this has something to do with the Pack URI , but I cannot for the life of me figure out what.

How can I use a local variable in a method from another method?

ε祈祈猫儿з 提交于 2021-02-05 10:50:32
问题 private void UserYoutubeService() { var youtubeService = new YouTubeService(new BaseClientService.Initializer() { HttpClientInitializer = credential, ApplicationName = Assembly.GetExecutingAssembly().GetName().Name }); } And I want to use the variable youtubeService in this method: static List<string> videosList = new List<string>(); public async void RetrieveUploadsList() { UserCredentials(); UserYoutubeService(); var channelsListRequest = youtubeService.Channels.List("contentDetails"); } I

How can I use a local variable in a method from another method?

こ雲淡風輕ζ 提交于 2021-02-05 10:50:06
问题 private void UserYoutubeService() { var youtubeService = new YouTubeService(new BaseClientService.Initializer() { HttpClientInitializer = credential, ApplicationName = Assembly.GetExecutingAssembly().GetName().Name }); } And I want to use the variable youtubeService in this method: static List<string> videosList = new List<string>(); public async void RetrieveUploadsList() { UserCredentials(); UserYoutubeService(); var channelsListRequest = youtubeService.Channels.List("contentDetails"); } I

Resizing JPEG without losing Quality

∥☆過路亽.° 提交于 2021-02-05 10:47:06
问题 I am trying to work on a small webbased Image editor with .NET . I am having issue with JPEG image resize.As I understand there is no way to manipulate JPEG without loosing some quality and saw this as only way to do it . Resizing an image in asp.net without losing the image quality . In this sample target image is saved as a png . So What I want to do is 1. When user uploads image save it as PNG 2. Manipulate it like resize rotate etc 3. Save it as JPEG If I save that png as a jpeg will that

Firebird Duplicating items C# .NET

主宰稳场 提交于 2021-02-05 10:43:05
问题 We have a Till Software which also works with restaurants built on .NET (C#) and Firebird DB. We are having a strange problem recently, the items in an order are duplicating themselves when we go back to the order. Strangely it's not the case always. It's happening only sometimes. I tried to figure out under what conditions it's happening but it's so random that it doesn't happen for a couple of days and then start duplicating items for the next two days. The software is so huge that I don't

Login prompt in spite of having windows authentication enabled

匆匆过客 提交于 2021-02-05 09:39:40
问题 We have enabled Windows authentication (Anonymous access is disabled) in IIS but, I am getting prompt to enter user-credentials for application Checked for the providers under authentication and the order is correct as well. Any pointers would be helpful. For information is it a .NET application hosted on IIS 7.5 回答1: Not sure if this is old but i hope it may be helpful for someone like me in near future. In Windows Authentication feature, goto providers. Just ensure that the NTLM is the only

Why data is not bound to label in my WPF application

China☆狼群 提交于 2021-02-05 08:59:07
问题 I am doing simple DataBinding application in WPF . In this whatever I type in TextBox called txtName should get apeared on the Label . For this purpose i used binding in WPF . But its not getting bound. My XAML: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="315*" /> <ColumnDefinition Width="188*" /> </Grid.ColumnDefinitions> <TextBox Height="23" HorizontalAlignment="Left" Margin="79,12,0,0" Name="txtName" VerticalAlignment="Top" Width="120" /> <Label Height="28" HorizontalAlignment

Is there some workaround I can use to avoid mixed-content errors?

眉间皱痕 提交于 2021-02-05 08:50:07
问题 I am working on a .Net core web app which is using esri services /resources. The app will eventually be hosted on the client's server. We have esri resources hosted on our servers and other esri resources hosted on their servers. For whatever reason, they refuse to use SSL and we do use SSL so I now have an Mixed content: The page at https://app.smt.smt was loaded over HTTPS but requests and insecure XMLHttpRequest endpoint. This request has been blocked; the content must be served over HTTPS

Is Hashtable.Synchronized suitable for use as a simple cache in a multithreaded environment?

99封情书 提交于 2021-02-05 08:48:06
问题 I'm currently using a Hashtable wrapped as a Hashtable.Synchronized as a simple cache in a library that could be used by a multi-threaded environment (such as asp.net) - is this a suitable use for this collection? I understand that there are more suitable constructs available in .Net 4.0, but I'm stuck with .Net 3.5. If it makes any difference, this cache is read from frequently, and is written to very infrequently (but needs to remain threadsafe). Basic usage is something along the lines of: