how to convert PDF to image file in vb.net
How to convert .eml to .msg?
I have been using Windows live mail to receive my emails. All the downloaded emails are in .eml format.
Now i want to configure my mailbox in Outlook 2010 but the mailbox export tool in windows live mail doesn't export the header information.
Is there any way i move my .eml message to outlook 2010 .msg format with complete header information?
Accessing HID
Hello,
I wanted to know if I can manage any HID using C#.
By managing, I mean removing and adding.
My HID is bluetooth enebled.
Thanks
ETW Log compression
How to specify the details? In System.Diagnostics.Tracing.EventSource itself, when setting it up?
Read Output from InvokeMethod of CIMSession
I have created a CIM Session and using the InvokeMethod have started/run a process/command on a remote computer.
On inspecting the CimMethodResult it shows ReturnValue = 0 - which means the process/command ran without an error. However, i am not able to see any output. I need to see the the output provided by the method and not only the final end result. And if there is an error I need to be able to see that error message too.
As a workaround, I can redirect the output to a file on the remote computer. And then somehow retrieve the file. But it's not a good way of working.
How Can I get the outputs directly without having to first do a re-direction to a file on the remote machine?
Please Help !
Not able to Download TestStack.White in Visual Studio 2017 for Unit Test Project
I have a unit test project which uses DOTNET framework. I want to create some UI related unit tests. I have chosen TestStack.White. When I try to download it from NuGet, I am getting the following errors:
- Package restore failed. Rolling back changes for 'UITesting'
- Package TestStack.White 0.13.3 is not compatible with uap10.0.15063(UAP,Version=v10.0.15063) / win10-arm-aot. Package testStack.White 0.13.03 supports: net40 (.NETFramework, v4.0)
- another 15 errors similar to above.
- Changed the target version
- Updated the version of "Microsoft.NetCore.UniversalWindowsPlatform" to the latest
- Downloaded "System.Management.Automation
I have searched in several blogs. I understood that the error is related to framework compatibility with the package I am trying to download. I did some R&D myself. I have also searched for answers in many blogs. However I could not find appropriate solution for my problem. I have tried the following options:
I tried some other options from the blogs, which I am not able to remember. None of them solved my problem. I would really appreciate any help/pointers. Thanks in advance.
MSHTML
I am trying to develop in MSHTML editor with WPF . I downloaded two sample projects, but neither provide search functionality.
I want the user to be able to type text to search for in a textbox and then press a search button.
Results of the search show up as highlighted text in the document (preferably in red boxes).
I also want to be able to modify the "id" attribute of html objects under the hood that are found in the search.
Thanks
This is an MSHTML (web) question).
Overlapped Data held in heap not being removed
Our application maintains an open socket connection for a long period of time (months or years) and stays constantly connected and sending/receiving data asynchronously.
I am having memory constantly increasing in the heap. A memory analyzer traces it back to the BeginSend in the asynchronous socket. In the heap it is OverlappedData, OverlappedCache, and OverlappedAsyncResult.
This issue has really caused a headache, and I've implemented a pool of pre-allocated buffers to get rid of the memory leak. This fixed the issue for the BeginReceive/EndReceive side. It got rid of some of the leaks for the BeginSend/EndSend side by using the pre-allocated buffer pool.
The BeginSend code looks like this:
ConnectionBuffer connBuffer = new ConnectionBuffer();
connBuffer.ConnectionID = conn.ConnID;
connBuffer.PrimaryID = conn.RemotePrimaryID;
connBuffer.SecondaryID = conn.RemoteSecondaryID;
connBuffer.TertiaryID = conn.RemoteTertiaryID;
connBuffer.Buffer = BufferPool.GetBuffer(BufferIOType.Outbound);
if (connBuffer.Buffer != null)
{
Buffer.BlockCopy(data, 0, connBuffer.Buffer.Data, 0, data.Length);
conn.Socket.BeginSend(connBuffer.Buffer.Data, 0, data.Length, 0, SendUnsecureMessageComplete, connBuffer);
}
Those IDs are for identifying who the message is sent to/from. The call to GetBuffer() gets a pre-allocated buffer from the buffer pool. The BlockCopy is copying the raw data from a previous array to the pre-allocated memory space. The connBuffer object is the state object passed to the callback function SendUnsecureMessageComplete.
Here's the callback function:
private void SendUnsecureMessageComplete(IAsyncResult ar){
ConnectionBuffer connBuffer = (ConnectionBuffer)ar.AsyncState;
Connection conn = ConnectionManager.GetConnection(connBuffer.ConnectionID, connBuffer.PrimaryID, connBuffer.SecondaryID, connBuffer.TertiaryID);
try
{
conn.Socket.EndSend(ar);
BufferPool.FreeBuffer(connBuffer.Buffer);
}
catch (ArgumentException)
{
// Socket is closing trying to send Log message - not an error
BufferPool.FreeBuffer(connBuffer.Buffer);
}
catch (Exception)
{
BufferPool.FreeBuffer(connBuffer.Buffer);
Dictionary<ArgsKeyType, object> args = new Dictionary<ArgsKeyType, object>();
args[ArgsKeyType.Conn] = conn;
ConnectionEvents.RaiseConnectionLost(args);
}
ar = null;
conn = null;
connBuffer = null;
}
Is it possible that I need to manually run the garbage collector with GC.Collect() in the callback function? I really would rather avoid that, but I'm not sure how to get those OverlappedData objects out of the heap?
Thanks for any help you can provide.
I cannot understand why the string with a period (ASCII 46) keeps getting sorted before the string with the hyphen (ASCII 45)?
I have a very simple code example posted on dotnetfiddle.net:
And it shows some surprising results (to me anyway). Everything looks normal up to the last string. The last string matches every prior string up to the first - (hyphen). I cannot understand for the life of me why the last string does not take it's place in the sort after the 3rd hyphenated string above in the example code?
I would assume that when 2 strings are compared character by character and they reach a point where the first character is different, the lowest ASCII valued character would be considered first and that would be the end of the discussion. But it seems the length of the strings play a role I do not understand.
Can someone please explain this behavior to me?
Thanks for reading!
Is any way to run exe from any browser excepting IE browser in windows OS
Customize Resources files not only by culture
Resource.es-MX.resx
Resource.en-US.resx
but we want to implmente something like:
Resource.es-MX.resx
Resource.es-MX.Company1.resx
Resource.es-MX.Company2.resx
Resource.en-US.resx
Resource.en-US.Company1.resx
Resource.en-US.Company2.resx
And I don't know if this is possible, if this is posible you know how I can do it? I think I need to override some class but I don't know which class and if is posible. this is because we want made this:
try to found the key on the company resource if not exists search on the resource file of the culture, for example if we wanted the value for 'key1' the app need to search on Resource.en-US.Company2.resx if not exists we need to search on Resource.en-US.resx, please let me know if you know how I can made this.
"Safe" to use System.Diagnostics.Trace.CorrelationManager.ActivityId in production?
We have a REST API that calls stored procedures to perform various tasks.
We need to track and log which stored procedures are called as a result of individual REST API HTTP requests (may be multiple).
For simplicity we are considering setting System.Diagnostics.Trace.CorrelationManager.ActivityId = Guid.NewGuid() in the REST API Controller when every request is received (in a "filter") and then picking it up again just before calling the stored procedures and including it as a parameter. This way we don't need to include the guid as a parameter in every single method call in every layer of the server.
Is it "safe" to use System.Diagnostics.Trace.CorrelationManager.ActivityId like this in production? E.g. it can't be "switched off" by accident somehow in the target environment?
Any other performance, security or multi threading issues worth considering by doing it like this?
Our REST API runs self hosted as a Windows Service. We are using .NET Framework 4.6.1.
WEBCAM
GDI+ font issue in Windows Server 2008 R2 Operating System
Hi,
I have installed the "Minion Pro" OTF font in the machine and the font exists in the "C:\Windows\Fonts" folder but unable to create System.Drawing.Font instance for "Minion Pro" font.
Please find the code snippet:
System.Drawing.Font minionPro = new System.Drawing.Font("Minion Pro", 12); if(minionPro.Name != "Minion Pro") minionPro = new System.Drawing.Font("Minion Pro Regular", 12);
The above code returns the "Microsoft Sans Serif" the default font in Windows Server 2008 R2. And in Windows 10 OS, this code returns "Minion Pro" as expected. So this problem occurs specific to Windows Server 2008 R2.
Can anyone help on this, how to retrieve the fonts properly in Windows 2008 R2?
Is there any known limitation?
Thanks,
Mohanaselvam
DirectorySecurity - Attempted to perform an unauthorized operation.
Can someone please try to explain to my why this does not work. This program is being ran from an account that is a local administrator who can through explorer take ownership of any file and folder. However when I try to do the same thing through code I get the error attempted to perform an unauthorized operation.
DirectoryInfo
di = newDirectoryInfo(folderpath);DirectorySecurity ds = newDirectorySecurity();SecurityIdentifier sid = newSecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null);ds.SetOwner(sid);
di.SetAccessControl(ds);
it isn't till the di.SetAccessControl(ds) does it error out. Can someone please help me with this...
澳洲MU毕业证莫道克大学学历认证Q/微信993398773购买澳洲MU毕业证成绩单教育部学历认证留信认证原版1:1制作电子图修改GPA[诚招代理] Murdoch University
Microsoft.AspNetCore.Antiforgery was not found
Please help to solve problem,
I have a project, target framework is netcoreapp2.1. It works fine on my developer machine but fails with the following exception on target Ubuntu machine:
An assembly specified in the application dependencies manifest (CloudTester.Launcher.Service.deps.json) was not found:
package: 'Microsoft.AspNetCore.Antiforgery', version: '2.1.1'
path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll'
On my developer machine I have the following
.NET Core SDKs installed:
2.0.3 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.403 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
On ubuntu I have the following:
.NET Core SDKs installed:No SDKs were found.
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.9 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
It seems the problem is that on my developer machine
path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll' goes to SDK folder, there this dll is present, but I don't want to install SDK on target machine!
Please help to understand what's going on and how to fix the problem
Alexander
Alexander
Running .Net exe from windows scheduler to generate the PDF files using Reportviewer and intermittently getting below error
at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.CodeCompiler.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs)
at Microsoft.VisualBasic.VBCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at System.CodeDom.Compiler.CodeCompiler.FromDomBatch(CompilerParameters options, CodeCompileUnit[] ea)
at System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromDomBatch(CompilerParameters options, CodeCompileUnit[] ea)
at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.InternalCompile(AppDomain compilationTempAppDomain, Boolean refusePermissions)
at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.<>c__DisplayClass2.<Compile>b__0()
at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.<>c__DisplayClass1.<Run>b__0(Object state)
at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
at Microsoft.ReportingServices.Diagnostics.RevertImpersonationContext.Run(ContextBody callback)
at Microsoft.ReportingServices.RdlExpressions.ExprHostCompiler.Compile(IExpressionHostAssemblyHolder expressionHostAssemblyHolder, AppDomain compilationTempAppDomain, Boolean refusePermissions, PublishingVersioning versioning)
at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.Phase3(ParameterInfoCollection& parameters, Dictionary`2& groupingExprCountAtScope)
at Microsoft.ReportingServices.ReportPublishing.ReportPublishing.InternalCreateIntermediateFormat(Stream definitionStream, String& description, String& language, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CompileOdpReport(PublishingContext reportPublishingContext, IDataProtection dataProtection, PublishingErrorContext errorContext, String& reportDescription, String& reportLanguage, ParameterInfoCollection& parameters, DataSourceInfoCollection& dataSources, DataSetInfoCollection& sharedDataSetReferences, UserLocationFlags& userReferenceLocation, ArrayList& dataSetsName, Boolean& hasExternalImages, Boolean& hasHyperlinks, Byte[]& dataSetsHash)
at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.CreateIntermediateFormat(PublishingContext reportPublishingContext, IDataProtection dataProtection) Int32 ExecWaitWithCaptureUnimpersonated(Microsoft.Win32.SafeHandles.SafeUserTokenHandle, System.String, System.String, System.CodeDom.Compiler.TempFileCollection, System.String ByRef, System.String ByRef, System.String)
Error in DocumentGenerationOnlineService-RenderReportData()
Timed out waiting for a program to execute. The command being executed was "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" /noconfig @"C:\Windows\TEMP\5iabw1hv.cmdline". at SCIF.PM.DocumentGeneration.DocumentGenerationOnlineService.RenderReportData(IEnumerable`1 documentData)
at SCIF.PM.DocumentGeneration.DocumentGenerationOnlineService.GenerateReport(IEnumerable`1 source) Byte[] RenderReportData(System.Collections.Generic.IEnumerable`1[SCIF.PM.Domain.DTO.DocumentDTO.IPolicyDocument])
الاصلاح الفوري غسالات طومسون ( 01014723434 ) غسالات طومسون (01225025360) التجمع الخامس
How to show a big Bitmap
Hi guys!
I've been troubled by this problem for a long time:How to display a very large Bitmap?This bitmap is bigger than 50000*50000 pixels.If I try to create a bitmap such as:
Bitmap test = new Bitmap(50000, 50000,PixelFormat.Format8bppIndexed);
I will get the error: Parameter is not valid. How can I solve this problem??My computer memory is 8 gigabytes.
Waiting for your reply,thank you!