The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

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

Sign up to Post

I'm confirming on the ServicePointManager...

That if I use this with an HttpWebRequest, it will require one of these protocols:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 Or System.Net.SecurityProtocolType.Ssl3 Or System.Net.SecurityProtocolType.Tls

Open in new window

When we send XML to the client, it is erroring with a 500 server error, and I suspect it is because, as I was just informed, that they haven't configured the TLS12 yet.

If I have that protocol set prior to sending our HttpWebRequest, will it cause a 500 server error if they don't have it configured?

OWASP Proactive Controls
LVL 12
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

I am currently building a web application with ASP.NET MVC and I'm using ReactJs.NET in the front-end. I want to use Webpack with ReactJS.NET's server-side rendering in my project, but I can't seem to get it working. I followed the the instructions on the ReactJS.NET site. I get an error that says: Could not find a part of the path 'C:\...\build\server.bundle.js'.

Here's what my webpack.config.js file looks like:
"use strict";

var path = require("path");
var WebpackNotifierPlugin = require("webpack-notifier");
var BrowserSyncPlugin = require("browser-sync-webpack-plugin");

module.exports = {

    entry: './Scripts/Home/react/server.js',
    output: {
        filename: './wwwroot/server.bundle.js',
    module: {
        rules: [
                test: /\.js$/,
                exclude: /node_modules/,
                use: {
                    loader: "babel-loader"
    resolve: {
        extensions: ['*', '.js', '.jsx'],
    devtool: "inline-source-map",
    plugins: [new WebpackNotifierPlugin(), new BrowserSyncPlugin()]

Open in new window

I made a simple test jsx file that I expose globally in ~/Scripts/Home/react/server.js:
import ServerRenderTest from './ServerRenderTest.jsx';

global.ServerRenderTest = ServerRenderTest;

Open in new window

And the ServerRenderTest.jsx file:
export default class ServerRenderTest extends React.Component {
    render() {
        return (
                <h2>Hello from the ServerRenderTest</h2>

Open in new window

I also added this to App_Start/ReactConfig.cs:

Open in new window

How to show tooltip on hover of image icon who is next to checkboxlist in and c#?

I have 10-11 checkboxes with different values.
Ex. Chk CA
       Chk MN image icon
       Chk OH image icon
       Chk TN
       Chk NY  image icon

When we hover the image icon, help tooltip will appear? How can that be accomplished if we get the data from database. Or whats the bet approach
How can I double click on a text box and copy the contents in Visual Basic. And please make your answer understandable and complete so I will be able to use it on my web site.
Thank you very much for any help you can give me.

I have a proxy server which is windows 2012 server and I route to another webserver using reverse proxy. The webserver is windows 2003 and we have an application installed.
All the functionalities are working fine except when I try to generate excel thru crystal report I am getting bad gateway error.
Trying to create a connection string in web.config.  It will connect a .aspx page and pull a recordset out of database on SQL Express.  SQL express is not local it's a remote server.  Have login and password set up but keeps coming up with "SqlException (0x80131904): Login failed for user"
The login name is set up in SQL Express, and on the database it has permissions to select on the view.  
Tried using an account that can access everything and still failed.

Any ideas?

Here's the string
<add name="conName" connectionString="Data Source=servername;Initial Catalog=databaseName;Persist Security Info=True;User ID=loginName;Password=password" providerName="System.Data.SqlClient" />

I have a requirement.I need to write in HTML/ JavaScript / CSS to embed a  chat BOT widget (web chat window) on an ASP.NET website with collapsible window. Initially an icon should be shown  and on click of that icon it should play an audio sound and then display that collapsible pop up .
(i.e.,The popup widget  should stick to the bottom of the browser and popup /collapse feature.)
An help will be highly appreciated.
I am checking if a particular user is in the database if not i want to popup a error which says not in the database but the method runs over the error and does not popup.

protected void Page_Load(object sender, EventArgs e)
            if (Session["ISADMIN"] == null)
                userrole = Session["USERROLE"].ToString();
                userplant = Session["USERPLANT"].ToString();

 public void isAdminUser()
           string con = ConfigurationManager.ConnectionStrings["OEEDBConnectionString"].ToString();
            string username = System.Web.HttpContext.Current.User.Identity.Name.Substring(System.Web.HttpContext.Current.User.Identity.Name.LastIndexOf(@"\") + 1); // Request.LogonUserIdentity.Name.Substring(Request.LogonUserIdentity.Name.LastIndexOf(@"\") + 1);             
            string IsAdmin = "NO";
            using (SqlConnection sqlcon = new SqlConnection(con))
                    SqlCommand mycmd = new SqlCommand();
                    mycmd.Connection = sqlcon;
                    mycmd.CommandText = "SELECT [User Id], Role, Plant FROM [WasteUsers] with (nolock)  WHERE [User Id] =" + "\'" + username.ToLower() + "\'";
                    mycmd.CommandType = CommandType.Text;
                    SqlDataReader myrdr = mycmd.ExecuteReader();

Open in new window

How Send Message via Whatsapp using ASP.NET Application....
What are your advices and technologies to design a Web portal UI for our customers to be robust, reliable, light and modern?
Note: The web portal will integrate with another Web applictions.
CompTIA Network+
LVL 12
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

I want to disable a dropdown in my cshtml code

<dropdown dropdown-menu-items="results" option-label="Not Reviewed" class="jq-checker-inspection-dropdown" data-poi-index="@inspectionItem.PointOfInspection"></dropdown>

I tried disabled = "true" and that does not work.

I also have a boolean variable
isenable = false

and i tried something like this

<dropdown dropdown-menu-items="results" option-label="Not Reviewed" class="jq-checker-inspection-dropdown" data-poi-index="@inspectionItem.PointOfInspection" @(isEnabled ? "disabled" : "")></dropdown>

None of them work. can you please suggest on how i can diable the dropdown box.
Thank you all in advance for your help!

I am just now learning ASP.NET and have plowed through a few tutorials. I Successfully completed one on Webforms and was able to publish the contents of a table with a "Select:" button for each of the rows. The intent? To allow details pertaining to the selected row (Patient ID) to be displayed in the next/new page.  

IN fact, when I run the application, I can click select on a row and then go to my aspx.cs tab and see the value when I hover over the variable (PT_ID).

int PT_ID = Convert.ToInt32((sender as LinkButton).CommandArgument);

My question is, and I apoligies for how "NOOB" this is but,

What kind of tutorial do I need to focus on next to have a new page open with the contents relevant that PT_ID?

What are these topics/functions called in ASP.NET that would allow me to send the variable assign to PT_ID to a webform that display the results of the subsequent query?

Im pretty sure I can find how to display a table in a webform once I pass the variable. Just dont know how to pass the variable from one form to another.

Thank you in advance!
I have an ASP.Net website and now I need to create an API for some of my clients.  Can I add that to a section of my website or do I have to create a separate one?  

My current site is not MVC.
Hi, I want to integrate Google Ads in my website ,Please provide me method and steps to do that.
Hi experts
Created a page in html and published and it's working fine but when same page copied and paste on different location, after publish page is not displaying properly its displayed like symbolic instead of image...
Please assist me..
Check attached file plz
Hi I am using Microsoft.Office.Interop, I have added its DLL on BIN folder and using its object, which is working fine when I run code through Visual Studio but when I run exact same code from IIS then It gets failed, I tried to find solution but its not working, Please suggest what I can do to fix that. Below is my code:
Dim xlapp As Excel.Application
            Dim xlworkbook As Excel.Workbook
            Dim xlworksheet As Excel.Worksheet
            Dim misvalue As Object = Reflection.Missing.Value
            Dim sheetIndex As Integer = 0
            xlapp = New Excel.Application
            xlworkbook = xlapp.Workbooks.Add(misvalue)
            xlworksheet = xlworkbook.Sheets("Sheet1")
            sheetIndex += 1

            ' Copy the DataTable to an object array
            Dim rawData(dt.Rows.Count, dt.Columns.Count - 1) As Object

            ' Copy the column names to the first row of the object array
            For col = 0 To dt.Columns.Count - 1
                rawData(0, col) = dt.Columns(col).ColumnName

            ' Copy the values to the object array
            For col = 0 To dt.Columns.Count - 1
                For row = 0 To dt.Rows.Count - 1
                    rawData(row + 1, col) = dt.Rows(row).ItemArray(col)
            ' Calculate the final column letter
            Dim finalColLetter As String = String.Empty
            Dim …
This is my web.config file:

<?xml version="1.0" encoding="utf-8"?>

  For more information on how to configure your ASP.NET application, please visit
    <compilation debug="true" targetFramework="4.6.1"/>
    <httpRuntime targetFramework="4.6.1"/>
      <compiler language="c#;cs;csharp" extension=".cs"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701"/>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
    <directoryBrowse enabled="true"/>
        <binding name="BasicHttpBinding_IService1" >
Can anyone give me the code to display a multiple page tiff image using MVC and ASP.Net C#?
Try to run a ASP Core 2.0 with C# and the CSS can only apply if I set the APP URL to 53400 port. It doesn't work for other port. Why it appear so strange ?

OWASP: Threats Fundamentals
LVL 12
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

I created a click-once install for a .NET app.  Crystal reports is downloading and installing.  The problem is that the download location is wrong.

An error occurred downloading the following resource:

Should be

How can I set the correct location?  It should be https and xxxxx not downloads.

I have three tables that I need to compare and use a checkbox

Table one - list of all the stores
Table two - list of managers
Table three - list of store assignments

Table three is the one that needs to be able to update / add / delete

I would like a list of all the stores when a manager is picked (dropdown list) in one gridview, and the ability to check (assign a store to) and uncheck (remove an assigned store).  Table one and two are static and will never change.

Any help would be great!  I am stuck on how to do the SQL statement and the code for the gridview
i have a gridview with a header template and trying to use masked edit extender so its easy for users to enter data as they tab through the gridview. but what happens is:

even after i click out of focus and enter data this happens:

how do i go by removing focus of the textbox and how can i have the mask to stay and be replace by the time entered by the user??

 <asp:TemplateField HeaderText="Start Time" SortExpression="Start Time">
                    <asp:MaskedEditExtender runat="server"
                                            InputDirection="LeftToRight" AcceptAMPM="true"
                                            ErrorTooltipEnabled="True"  ID="MENEWStartTImeEdit" ClearMaskOnLostFocus="false" />
                    <asp:TextBox ID="TextBox13" runat="server" Text='<%# Bind("Start_Time","{0:HH}:{0:mm}") %>'></asp:TextBox>

Open in new window

I have images saved in different Idproduct folder. Each image will be linked to a third-party website with the same image. I followed  the expert Snarf0001's  example. But has error saying 'i' is not declared. It may be inaccessible due to its protection level.
Below is the coding:
 <a href="<%=productsku%>&imagelocation=images/600x600/<%=idProduct%>/<%= System.IO.Path.GetFileName(imageList(i)) %>"><img width="60px" height="60px" src="images/600x600/<%=idProduct%>/<%= System.IO.Path.GetFileName(imageList(i)) %></a> 

Open in new window

Please advise! Thank you!
Razor# MVC

I have a javascript function that is called when a drop down is changed. this function calls a code behind function in the controller. the problem is the js function does not wait for the function to run, it never calls success or error. Once the java script function exists then the function called in the code behind runs.

Can anyone advise on how to make the javascript function wait while the code behind function is called and returns?

function toggleDIvDisplay(e) {
        var result;
            type: "POST",
            url: '@Url.Action("FleetSelect", "Reports")',
            data: "{'value':'" + e + "'}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) {
                result = data;
                if (data == "OK") {

             error: function () {
                alert("Failed to load Item");

        if (result == "123") {
        else {
            @* $('#divtwo').hide(); *@

Open in new window

Code behind controller
 public JsonResult FleetSelect(string value)
            List<ReportType> rList = GetReportList();
            foreach (ReportType rt in rList)
                if ( == Convert.ToInt32(value))
                    if (rt.vehicle)
                        return new JsonResult { Data = "V" }; 
                        return new JsonResult { Data = "F" };
            return new JsonResult { Data = "V" };

Open in new window

We create VMs with the latest build of our code on. One VM has a weird ASYNC_NETWORK_IO error when running a SQL SELECT statement. It isn't on any other VM.

I have tried googling for the error - clearly something failed to start or get set when this VM was created.

Just for peace of mind it would be really useful to know what might be the cause of this and if there is some setting I can adjust to fix it.

The symptom is that a SQL SELECT statement just seems to time out with this ASYNC_NETWORK_IO error, but the strange thing is that it must have somehow returned some results because it then blocks an INSERT statement that has used the results of the SELECT statement.

Everything necessary for the application is on the VM - the ASP.NET application and the SQL Server database so there is no actual network access outside of the VM.

There is no antivirus running on the VM either which is one possibly cause I came across.

The server is Windows Server 2016 and the SQL Server is 2016 also.

I've attached a picture of what is happening.

Just to repeat this doesn't occur on any other VMs with the same software on.

I have tried restarting IIS and restarting the VM.

The VM is Hyper-V.







The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications