.NET Programming

133K

Solutions

38K

Contributors

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hello Folks,

I've an ASP.NET website that is consuming more RAM on IIS worker process. Please see below points.

1. The website comprised with around 700 aspx pages along with 100 user controls.
2. The website takes around 1 GB RAM once worker process starts.

Could you assist below points?
1. How to diagnose, what are the problems with either memory leaks, unnecessary data loaded or other factors?
2. How to resolve it?

Best Regards
0
Cloud Class® Course: Certified Penetration Testing
LVL 12
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

This is an example of Grid.MVC.  The project I'm working on has all Grid.MVC.  

Grid.MVC example

Is there a way to hover over a grid row and show that row's , maybe like a tooltip or a popup?

Thinking out loud... grid renders to HTML and we have the rows. Each row has an id (probably). Have a jquery .hover() and pass id of the row? (not sure)
0
I have a text file with over 2,000 lines

I need to process each line but how do check its unique first?
File.ReadAllLines shows how to read the file into an array but isn't testing for duplicates first

Sudo code just to illustrate
        // Open the file to read from.
        string[] List= File.ReadAllLines(path);
        foreach (string Line in List){
           unless(Seen the Line) {// Check not processed the Line already
            // Do stuff with Line
            // Add To Seen
            }

        }

Open in new window

0
My Problem is:
In VB.Net, How to fix a foreign   key column that is null (see attached)Null-Column.pdf
0
Hello Experts,
I am trying to run a set of DOS commands from C# program, which need to be executed in a Windows Service.  It runs fine in Development machine and Test Server.  But when I deploy that in Production, it does not run.  When I say it does not run, only DOS portion does run.  The C# part runs just fine.  Any idea, what is going on?  Is there a way I can capture any exception?  Any help is highly appreciated.

Thank you very much in advance.
0
How do you retrieve data using the AccessDataSource and the .SelectCommandType = SqlDataSourceCommandType.StoredProcedure?
0
Tried a lot to identify the root cause of this error but totally failed. Any suggestion will be highly helpful.

Try
    Dim Smtp_Server As New SmtpClient
    Dim e_mail As New MailMessage()
    Smtp_Server.UseDefaultCredentials = False
    Smtp_Server.Credentials = New Net.NetworkCredential(txtFrom.Text, txtPassword.Text)
    Smtp_Server.Port = cmbPort.Text

    Smtp_Server.EnableSsl = cbxSSL.Checked
    Smtp_Server.Host = cmbHost.Text

    e_mail = New MailMessage()
    e_mail.From = New MailAddress(txtFrom.Text)
    e_mail.To.Add(txtTo.Text)
    e_mail.Subject = "Auto Email"
    e_mail.IsBodyHtml = False
    e_mail.Body = "Hi, This is test mail."

    Smtp_Server.Send(e_mail)
    MsgBox("Mail Sent")


Catch error_t As Exception
    MsgBox(error_t.ToString)
End Try

Open in new window

0
I'm working on a new project with lots of grids. They're all Grid.MVC except for one that's jqQuery. The project is C#, MVC, jQuery.

The grids show financial data. For example, number of equiments a company has, what country the assets are in, how many assets there are, datetime column,  .User exports to Excel or CSV.  Grids have paging and sorting.  Some grids are editable.

Only one section of the application is using jqGrid. Looks like the ex-developer wanted to develop something new and he used jqGrid.

Now, I need to decide and let my manager know which way to go. Looking at jqGrid and knowing this is a financial app with grids, I'm thinking we need to use jqGrid moving forward because it offers more functionality.

Any input on either and why and why not use them?
0
I have been developing with ASP.NET web forms for years and had decided to learn MVC and Entity Framework model as I am becoming irrelevant in skill set. But in discussions with some of my peers they indicated I should start with ASP.NET Core Razor environment. Since I have had limited exposure to both, I need suggestions on where to get started, kind of like a step one learn this, step two learn that. I am kind of at a loss of where to begin as it all looks so foreign to what I am used to.
0
I'm building a "query builder". User selects columns, then "conditions" which is the "where" clause.

Our users aren't technical.

1. My manager says to make it look like what TFS does....  AND, OR and then maybe parenthesis to see what conditions should be in parenthesis and grouped together.

This is TFS query builder

tfs.png

2. I was researching this  and came across this  Query Builder Example - Demo

Please look at the "Condition" section. It has "all", "any", "none" and "not all".  No And/Or and parenthesis and grouping the AND/OR together.

example
I want to do the "all", "any", none" and "not all". Much simpler than AND/Or and parenthesis... too complicated.

How would you guys do it? how can I explain this to my manager that "all", "any", "none" and "not all" is simpler? how can I convince him? Other examples I can look at?
0
Free Tool: Path Explorer
LVL 12
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Hi,

Is there anybody who could help us to solve this issue. What we want to do is to select 2 or more attachments of an e-mail in Outlook 365 and drag and drop these files on a listbox. The files should be saved in a folder as file and the name of the file added to the listbox.

In the DrapDrop event of listbox, we handle the e.Data if "FileGroupDescriptor" is a member of the data (GetDataPresent).
It is possible to extract the number of files that are dropped and we can extract theses names of the data. See the example below ("Get names of files that are dropped").
This works fine. But now we will get the data of each separate file from the e.data stream. The first one is not a problem, see 'Get memorystream of data of file' in the sample code below. But how can we get a memorystream of the second, third etc files of the drop action?
   
Any help will be appreciated

    If e.Data.GetDataPresent("FileGroupDescriptor") Then

      ' Get names of files that are dropped
        Dim theStream As Stream = CType(e.Data.GetData("FileGroupDescriptor"), Stream)
        Dim fileGroupDescriptor(theStream.Length) As Byte
        theStream.Read(fileGroupDescriptor, 0, theStream.Length)
        Dim liNrFiles As Integer = fileGroupDescriptor(0)
        Dim fileName(liNrFiles) As System.Text.StringBuilder
            For liY = 1 To liNrFiles
                fileName(liY) = New System.Text.StringBuilder("")
                Dim i As Integer = 76 + ((liY - 1) * 332)
         …
0
C# web service calling another .NET assembly using reflection
I use a web service to a run-time assembly call using C# Reflection.
The assembly is in Binary format in database. All records contains a binary data which is almost same in structure. It has a Start method in a class called 'MyAssembly'
First I loads assembly object using  the Binary data, then finds the type - MyAssembly from it and then calls a method 'Start'. The start will write the logs into a directory. This works entirely fine when we call from an executable. All executables goes into separate process ID and the results are getting.

Then calling the same step using a Web service hosted in IIS, the results are getting messed up. Simultaneous calls to the same method gets the results into different different calls.
Example: Method1 called using web service and the logs are writing into File1.
Method1 again called using different arguments and the logs are writing into File2.
When calling method1 two times at the same point of time using web service, gets the logs messed up, File1 details are showing in File2 and File2 are in File1. It is not only the logs issue bug also the execution are getting wrong that inner methods are not getting proper outputs and return values. Everything messed up.

When the web service is calling EXE program (Which is not allowed in so many conditions) - That is without finding out the method using reflection and then calling it, it just calls an exe program using …
0
I originally posted this question and got an answer.

https://www.experts-exchange.com/questions/29099706/C-Service-Export-Extended-Price-does-not-export-in-the-same-position.html#acceptAnswerByMember

I'm trying to modify my code to implement the solution but having issues.  I indicated in "CAPS" in code below where the error is occurring.
using System;
using System.ComponentModel.DataAnnotations;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Export.Models
{
    public class POModel
    {
        [Display(Order = 0)]
        public string name { get; set; }
        [Display(Order = 1)]
        public string en { get; set; }
        [Display(Order = 2)]
        public string state { get; set; }
        [Display(Order = 3)]
        public string purchaseOrderNumber { get; set; }
        [Display(Order = 4)]
        public string dateOrder { get; set; }
        [Display(Order = 5)]
        public string currency { get; set; }
        [Display(Order = 6)]
        public string requiredDate { get; set; }
        [Display(Order = 7)]
        public string promisedDate { get; set; }
        [Display(Order = 8)]
        public string shipDateNew { get; set; }
        [Display(Order = 9)]
        public string total { get; set; }
        [Display(Order = 10)]
        public string Name2 { get; set; }
        [Display(Order = 11)]
        public string unitPrice { get; set; }
        [Display(Order = 12)]
  

Open in new window

0
Is their a way to selectively control the painting of a windows form? The reason I ask is that I have a windows form with controls on it. I need to update update the controls, but I do not want the repaint of the form controls to occur immediately until a particular function has completed running.
0
Downloaded a Sample App.  I am using VS2015.  The app doesn't compile.  I am receiving what seems to be a REST error.

CS1503      Argument 2: cannot convert from 'System.Action<System.IO.Stream>' to 'byte[]'      Tradovate.Services      

The error is occurring at

                request.AddFile(param.Value.Name.ToString(), param.Value.Writer,
                                param.Value.FileName.ToString(), param.Value.ContentType.ToString());

In the below code.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text.RegularExpressions;
using System.IO;
using System.Web;
using System.Linq;
using System.Net;
using System.Text;
using Newtonsoft.Json;
using RestSharp;

namespace Tradovate.Services.Client
{
    /// <summary>
    /// API client is mainly responsible for making the HTTP call to the API backend.
    /// </summary>
    public partial class ApiClient
    {
        private JsonSerializerSettings serializerSettings = new JsonSerializerSettings
        {
            ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
        };

        /// <summary>
        /// Allows for extending request processing for <see cref="ApiClient"/> generated code.
        /// </summary>
        /// <param name="request">The RestSharp request object</param>
        partial void InterceptRequest(IRestRequest request);

        /// <summary>
        /// Allows for extending response processing for <see

Open in new window

0
I have a VB.NET Windows forms application.  I'm trying to load a pdf file into the WebBrowser object.  I get a gray background and that's it.  It seems to work on another computer.  I've reinstalled the Adobe Reader application several times, rebooted.  the browser loads fine with internet urls, text files, etc... just not PDF files.  I'm thinking there is something on this computer that maybe causing the problem but I am not getting any errors. I developing in VS 2017 and using .NET 4.6 framework.


I also had the same problem when trying to use the Adobe COM object.  Just get a gray background and the initializing …. starts and then it errors out.  Worked fine on other computer.
0
I created a service with the below model.   The service gets data from a database and exports it to an excel CSV file.  

The issue is with the extended price.  The export will put it in position 14 (where it is at currently) but sometimes it is added at the end.  

Anyone know why that would happen?  

I have a winform app that I'm using to troubleshoot the problem.  Also, I'm running the service on my local computer and it seems to put the extended price in the last column instead of position 14.  Any ideas?
    public class PODataModel
    {
        public string name { get; set; }
        public string en { get; set; }
        public string state { get; set; }
        public string purchaseOrderNumber { get; set; }
        public string dateOrder { get; set; }
        public string currency { get; set; }
        public string requiredDate { get; set; }
        public string promisedDate { get; set; }
        public string shipDateNew { get; set; }
        public string total { get; set; }
        public string Name2 { get; set; }
        public string unitPrice { get; set; }
        public string rate { get; set; }
        public string extendedPrice
        {
            get
            {
                double value = ((Convert.ToDouble(unitPrice) * Convert.ToDouble(total)) - ((Convert.ToDouble(unitPrice) * Convert.ToDouble(total) * (Convert.ToDouble(rate) / 100))));
                return value.ToString("###0.00");
            }
        }
        public 

Open in new window

0
I'm working on a new project that has lots of grids. I see this code

 @Html.Grid(Model.Results).Columns(column =>

Open in new window


1. My initial thought was that this is Grid.MVC . I searched for
@using GridMvc.Html

Open in new window

, didn't find it in the code. I don't see any gridmvc.css or grid.mvc razor code that comes with downloading and installing Grid.MVC

This is an example of Grid.MVC Grid.MVC example

2. Since I didn't see anything related to Grid.MVC, I stepped thru the code and it seems like this code base is creating it's own grid and using @Html.Grid

This is what I see, some of the code. Just want to make sure I'm correct that the code has created it's own Grid

 a. In Razor    
 @Html.Grid(Model.Results).Columns(column =>

Open in new window

b. Traced "Grid" property to this code. So, this is custom code...Extension method to create a grid...it's not Grid.MVC...Correct?

public static class GridExtensions
    {
        private const string CouldNotFindView =
            "The view '{0}' or its master could not be found. The following locations were searched:{1}";

        /// <summary>
        /// Creates a grid using the specified datasource.
        /// </summary>
        /// <typeparam name="T">Type of datasouce element</typeparam>
        /// <returns></returns>
        public static IGrid<T> Grid<T>(this HtmlHelper helper, IEnumerable<T> dataSource) where T : class
       

Open in new window

0
Dear EE experts,

Good day! We would like to ask for tech support regarding to SharePoint Designer 2007,
where is lookup in sharepoint designer 2007 workflow actions?
We would like to add a Lookup <xxxxx> property for <xxxxxxx>, but we couldn't find that Lookup action.
Please see the attached screenshot...
We couldn't continue to move on to another step as we don't know where's that "Lookup".

The problem is, we reinstalled everything, we have a running workflow before but the person who developed that program wasn't here anymore, so after we reinstalled that MOSS 2007, and about to re-create that workflow, we got stucked on that part...

Thank you and hope to hear for possible solutions regarding this matter...
:)
Lookup-in-SPDesignerWorkflow2007.JPG
2.jpg
0
Free Tool: SSL Checker
LVL 12
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Not sure how to ask this, but here goes...

Software: Vb.net 2005

I have a datagridview that updates records fine, but the problem is all of the previous instances has the same row values in them.
I want to fix it so only one instance is loaded.
See attached.Test-Form-1.pdfTest-Form-2.pdf

Thanks for any help
0
I'm working on a project with a page where users can build their reports dynamically.

We have a listbox.... user selects from values from it. These are the columns for the Excel report

Next, user can build the where-clause. These are textboxes. For example.... textbox1 = some value (they type this). Now, this is unlimited. User can click on a button, and create another clause. We AND them together. There's no limit.

I think there should be a limit to this. Maybe 5 to 10. My manager says there shouldn't be a limit. He gave an example...in TFS...user can create as many query where-clause as they want. Here's an example Example

So, should there be a limit  in where-clause when we create a SQL for reporting and the report is dynamic?
0
Hello Experts,

I have a problem with deploy a desktop application in a  client machine without installing crystal reports or visual studio.

I searched on the internet and i find a lot of suggestion , but i can't find the correct way ( i can't find the files of runtime for crystal reports)

Thank you.

Regards,
0
What are my options for creating a PDF file from my WebApi2... initiated from my SPA using Sencha ExtJs? The concept is I want to have a template in PDF with a grid, and based on user selection from my front end website, fill in the grid with data from my database. I'm not looking for someone to write code for me, just for a path to go down. I am open to suggestions so if a template is too complex I am open to creating the PDF from stratch every time. Whichever is the least complicated option as I am definitely no expert.

thanks!
0
We have 2 tiers at our workplace. We only want developers to run jobs on lower tier, not upper tier. We created 2 folders: upper folder and lower folder. We had successfully restricted developers access to the upper tiers by allowing them access to only lower tier. However, when developers run DSL (groovy script), the groovy script can access upper tier.

To solve the issue we installed Project Authorized plugin to assign specific user to run the jobs then we blocked the user to run jobs on upper tier. However, doing so won't stop the job from running on upper tier.

What is the best way to block DSL job from running on upper tier?
0
I have exclude App_Licenses.dll from my solution develop with VS 2012 with .NET Framework (4.0)  and having this issue :

Error 102      Unrecognized attribute 'requestValidationMode'. Note that attribute names are case-sensitive.

my current IDE is VS 2008 with .NET Framework (3.5)

My question is :
1) Does the build failed because the Framework?
2) If the Framework is not the issue, how should I solve this?

Thank You
0

.NET Programming

133K

Solutions

38K

Contributors

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.