It seems a very simple issue but it has killed my day. I have an update-able gridview and I put a dropdownlist in the edit mode of one of the columns. The items in the DDL is statically set. BUT the selected item always remains the first item. How can I fix this?

   protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        string userID = ((Label)GridView1.Rows[e.RowIndex].FindControl("lbluserID")).Text;

        string role = ((DropDownList)GridView1.Rows[e.RowIndex].FindControl("DropDownList1")).SelectedValue;


        SqlCommand cmd = new SqlCommand();
        cmd.Connection = DBSettings.sqlConn;
        cmd.CommandText = "Update tbl_users set role=@role , pending='false' ,approved='true' , declined='false' where ID=@ID";
        cmd.Parameters.AddWithValue("@role", role);
        cmd.Parameters.AddWithValue("@ID", userID);
        cmd.ExecuteNonQuery();
        GridView1.EditIndex = -1;
        gridFill();

    }

here is the aspx of the gridView (only the ddl part):

  <asp:TemplateField HeaderText="Role">
                <EditItemTemplate>
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
                        <asp:ListItem Value="">--Select--</asp:ListItem>
                        <asp:ListItem Value="Admin" Text="Admin">           </asp:ListItem>
                        <asp:ListItem Value="Editor" Text="Editor">    </asp:ListItem>
                        <asp:ListItem Value="Viewer" Text="Viewer">     </asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text="pending"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>

When I include the ckeditor scripts directly in the head of the page, the data I enter in this field is correctly saved after a postback:

<asp:TextBox runat="server" ID="tbDescription" CssClass="ckeditor" TextMode="MultiLine" />
 <asp:LinkButton ID="lbtnSaveIt" Text="Save" runat="server" />

<head>
    <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="/ckeditor/adapters/jquery.js"></script>
</head>

However, I want to include the ckeditor scripts conditionally. So I remove the files from the <head> section and add them to codebehind. For now there is no condition in the code-behind and the scripts should always be added.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Me.Page.ClientScript.RegisterClientScriptInclude("ckeditor", "/ckeditor/ckeditor.js")
    Me.Page.ClientScript.RegisterClientScriptInclude("ckeditor_adapters", "/ckeditor/adapters/jquery.js")
End Sub

But when I include the files through code, the new value I enter in tbDescription is no longer saved. It uses the value that was in that textbox originally on Page_Load, but does not include my changes. I also tried including the scripts in other ways:

Me.Page.ClientScript.RegisterStartupScript(Me.GetType, "ckeditor", "/ckeditor/ckeditor.js")
Me.Page.ClientScript.RegisterStartupScript(Me.GetType,"ckeditor_adapters", "/ckeditor/adapters/jquery.js")

And

Me.Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "ckeditor", "/ckeditor/ckeditor.js")
Me.Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "ckeditor_adapters", "/ckeditor/adapters/jquery.js")

But with those the ckeditor UI does not even show.

Why is this codebehind script inclusion hampering the working?

My understanding regarding network model communication:

Application layer:

1. HTTP(Not Persistent or stateless): For exchanging messages like get, post, put etc. Here connection is made to webserver and disconnected after sending response. So server will not keep track of the previous requests.

2. Websockets(Persistent or statefull): For creating a communication channel that will be open to exchange data. Here we can keep track of the previous requests. Like we can know how many users are currently connected to our server.

Transport layer:

TCP(Persistant and Statefull): Will let the server know to which application to connect using port number. Both HTTP and web sockets will work upon this layer.

Considering working with HTTP and TCP:

  1. I make a HTTP request from browser(application layer):
  2. Connects to web server sends all files requested and also makes a TCP connection with the application(transport layer).
  3. After sending response it's disconnected.

My confusion:

I got totally confused when I heard, read that TCP is Statefull and Persistant connection.

Q1. Now after step three is browser still connected to webserver because of TCP?

Q2. Is the context object we get in server side in c# code is the complete request packet with HTTP info, TCP info, function to invoke or controller to invoke in MVC etc?

Q3. If client and server are still connected with TCP. Then on next HTTP request does it will use the available TCP connection or will create new TCP and HTTP connection? Why can't it use previous TCP to communicate? Or TCP will be destroyed after HTTP? Or what's happening?

I developed a .net web service in .net framework 4.0 and deployed in widows server 2008 R2. Customers are able to consume the web service without any issues. Recently we upgraded the SSL certificate protocol from SSL 3.0 to TLS 1.2. The customers are unable to consume the web service after my protocol upgrade. I gone through some forums i found .net 4.0 doesn't support TLS 1.2 protocol so can anyone suggest the best solution to overcome this without upgrading the .NET framework?

I found this site: https://docs.microsoft.com/en-us/aspnet/core/security/cors

However I am confused in how to enable it globally, because it seems there are 2 ways to do it, whats the difference between these 2 ways? or they do 2 different things?

public IConfigurationRoot Configuration { get; }

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            //https://docs.microsoft.com/en-us/aspnet/core/security/cors
            services.AddCors(options =>
            {
                options.AddPolicy("AllowSpecificOrigin",
                    builder => builder.WithOrigins("http://example.com")
                                        .AllowAnyHeader()
                    );
            });

            services.Configure<MvcOptions>(options =>
            {
                options.Filters.Add(new CorsAuthorizationFilterFactory("AllowSpecificOrigin"));
            });

            // Add framework services.
            services.AddMvc();
        }

        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            app.UseCors("AllowSpecificOrigin");

            app.UseMvc();
        }

I need to clear the queryString so I implemented an httpmodule

 public void Init(HttpApplication context)
            {
             context.PostRequestHandlerExecute += newEventHandler(OnEndRequest);

    }

and this is the method :

 public void OnEndRequest(Object sender, EventArgs e)
        {
            HttpApplication context = (HttpApplication)sender;


            if (HttpContext.Current.Request.QueryString != null && HttpContext.Current.Request.QueryString.Count != 0)
            { HttpContext.Current.Request.QueryString.Clear(); }
    }

but it's giving an exception :

System.NotSupportedException was unhandled by user code
  HResult=-2146233067
  Message=Collection is read-only.

the purpuse is to hide the parameters shown in the adress bar , in order to make it impossible to the user to change the values of the parameters , I can't use post method , because , it's the problem of a whole application , so i can't go back to all pages and changes all the code . to understand ; I want that the request MyPage.aspx?Param1=1 be processed and the response returned to the client but the addres bar must show MyPage.aspx instead of MyPage.aspx?Param1=1

Does it use an internal Process.Start, or does it run a command line? My VS2017 RTM works OK with Chrome most of the time, then randomly it gives an error saying Couldn't start program http://localhost....

Then I have to switch back to Edge, have it open Edge, and paste the URL into Chrome so I can use the dev tools I prefer. I'd like to somehow track any error that may occur when VS tries to start Chrome, and if it uses a command line, maybe I can capture that somehow and run it manually to debug why Chrome won't open.

I've been trying quite a few things but can't get it exactly right.

@{ if (MyCondition)
     {
       <li><a href="someLink">Click Here</a></li>
     }
     else
     {
       <li><a href="someOtherLink">Click Here</a></li>              
     }
 }

The above doesn't work once the condition value is swapped it throws an error. It tries to maintain both link elements but I only want it to display one at a time depending on condition. There are a lot of HtmlHelper methods that I can't find proper documentation for so I'm here to ask you guys. Is there a method that can (1) select and html element and/or (2) apply/change an attribute value on the element?

Ideally I want to do something like this:

<li><a id="1" href="someLink">Click Here</a></li>
<li><a id="2" href="someOtherLink">Click Here</a></li>
if (myCondition) 
  HtmlElementById("1").Attribute("hidden", true);
else 
  HtmlElementById("2").Attribute("hidden", true);

I'm new to API, I have created couple of APIs and a simple UI. Can I host only the APIs in my IIS, If I host only the APIs, can I see the list of APIs if I browse to http://localhost/api

at the moment I can access the APIs if I browse to http://localhost/api/Houses/200

I have a model which contains (amongst other things) two lists of classes:

public class JobStructureViewModel
{ 
    public List<SimpleControl> Controls { get; set; }

    public List<JobStructureTasksModel> Tasks { get; set; }
}

I am displaying them in a Razor view with an editor template:

@model ConnectManager2.Models.JobStructureViewModel

   @using (Ajax.BeginForm("CreateJob", "JobCreator", new AjaxOptions { UpdateTargetId = "datagrid" }))
    {

    @Html.EditorFor(x => x.Tasks)

   @Html.EditorFor(x => x.Controls)
   <input style="display: none; width: 150px; height: 100%; margin: 0px; float: right; margin-right: 1.7em;" class="btn btn-default" id="createJobInput" type="submit" value="Submit Job" />
}

This is the signature of my POST method:

[HttpPost]
public ActionResult CreateJob(JobStructureViewModel model)

My problem is that when the form is posted back to the controller one of the lists is always null. If I remove one of the lists then the other one is returned successfully, but the framework doesn't seem to be able to cope with more than one list in a single view. Is there a way to make this possible or will I have to try another approach?

There are the classes for 'Tasks' and 'Controls' and the views they use.

public class JobStructureTasksModel
{

    public string Code { get; set; }

    public string Description { get; set; }

    public string Contract { get; set; }

    public int TaskID { get; set; }

    [Required(ErrorMessage = "Enter the required quantity")]
    [Range(1, 100, ErrorMessage = "Quantity must be between 1 and 100")]
    public float ReqQty { get; set; }

    public string skillset { get; set; }

    public bool Delete { get; set; }
}


@model ConnectManager2.Models.JobStructureTasksModel
<tr id ="@Model.TaskID">
<td>@Model.Code
    @Html.HiddenFor(x => x.Code)
</td>
<td> @Model.Description
     @Html.HiddenFor(x => x.Description)
</td> 
<td> @Model.Contract
    @Html.HiddenFor(x => x.Contract)
</td>
<td> @Html.TextBoxFor(x => x.ReqQty, new {style = "width:25%" ,onchange = "taskqtychanged()"})
     @Html.ValidationMessageFor(x => x.ReqQty)
</td>
<td>
    @Html.CheckBoxFor(x => x.Delete, new {taskid = @Model.TaskID,  onclick = "taskDeleted(this)" })
</td>
@Html.HiddenFor(x => x.TaskID)
</tr>


 public class SimpleControl
 {
    public SimpleControl()
    {
        Options = new List<string>();

    }

    public string Template { get; set; }
    public string CtrlType { get; set; }

    public string Name { get; set; }

    public string LabelText { get; set; }

    public string PageName { get; set; }

    public bool Mandatory { get; set; }

    public string InitialValue { get; set; }

    public string Value { get; set; }

    public bool CheckBoxValue { get; set; }

    [DataType(DataType.Date)]
    public DateTime? DateVal { get; set; }

    public TimeSpan? TimeVal { get; set; }

    public List<string> Options { get; set; }

    public override string ToString()
    {
        return Name + "; " + Value == null ? "" : Value;
    }
 }


@model JobClassLib.TemplateRoutines.SimpleControl
<div>
<div class="row padtop" id ="@Model.Name">
    <div class="col-xs-3">
        <label>@Model.LabelText</label>
    </div>
    <div class="col-xs-6">
        @if (Model.CtrlType == "textbox")
        {
            <td>@Html.TextBoxFor(x => x.Value, new { @class = "form-control add-job-field" })
            </td>
        }
        else if (Model.CtrlType == "multilinetextbox")
        {
            <td>@Html.TextAreaFor(x => x.Value, new { @class = "form-control add-job-field" })
            </td>
         }
         else if (Model.CtrlType == "combobox" || Model.CtrlType == "outcomecombobox")
         {
            <td>
                @Html.DropDownListFor(m => m.Value,
new SelectList(Model.Options, Model.Value), new { @class = "form-control    add-job-field" })
            </td>
        }
        else if (Model.CtrlType == "checkbox")
        {
            <td>@Html.CheckBoxFor(x => x.CheckBoxValue)
            </td>
        }
        else if (Model.CtrlType == "datepicker")
        {
            DateTime dt = (Model.DateVal.HasValue) ? Model.DateVal.Value : DateTime.Now;
            string dateString = dt.ToString(Telecetera.Common.BaseFormats.DateDBFormat);
            <td>@Html.TextBox("DateVal", dateString, new { @type = "date", @class = "form-control" })
            </td>

            <script>
                setInitialValue = function () {
                    $("#" + @Model.Name + " > input").val('@dateString');
                }
                setInitialValue();
            </script>

        }
        else if (Model.CtrlType == "timepicker")
        {
<td>@Html.TextBoxFor(model => model.TimeVal, new { ctrltype = "time" })
            </td>
        }
        else if (Model.CtrlType == "listview")
        {
            <td>
                <input class="btn btn-default min-width-btn"  type="button" onclick="jobCreationLVClicked('@Model.Name','@Model.Template','@Model.LabelText')" lvid="@Model.Name" value="@Model.GetLVCount(Model.Name, Model.Template)" />
            </td>
        }
        else if (Model.CtrlType == "customer")
        {
            @Html.HiddenFor(x => x.Value)
            <script>
                $('#'+ '@Model.Name').hide();
            </script>
        }
    </div>
    @Html.HiddenFor(x => x.Name)
    @Html.HiddenFor(x => x.PageName)
    @Html.HiddenFor(x => x.LabelText)
    @Html.HiddenFor(x => x.CtrlType)
    @Html.HiddenFor(x => x.Template)
    @Html.HiddenFor(x => x.UserID)

</div>
</div>

I have the following string:

<table align="center" class="wrapper header float-center">
    <tr>
        <td class="wrapper-inner">

            @renderOrderPropertyBlock("Price for room", "kr" + !hasRoom ? emptyField : room.TotalRoomAmount.ToString(), !hasRoom2 ? emptyField : room2.TotalRoomAmount.ToString(), bgColor)

        </td>
    </tr>
</table>

I need to print out "kr" after the price for the room. The string is working fine, but when I add "kr" + , I get the error:

Cannot implicitly convert string to bool, why is that?

I also tried: @renderOrderPropertyBlock("Price for room", "kr", !hasRoom, here I get the error: No overload for rederOrderPropertyBlock

How is the correct syntax to add "kr"?

Razor Generator precompiles .cshtml files then generate .cs files. I wonder, how does it work if I have some javascript files and css files with my view ?

some of my chtml files are corrupted and i am unable to recover it. I tried using recovery data software but after recovery also the file is not viewed properly. Below i am posting text content of that chtml file.Please help so that i can recover my code again. Thank you in advance.

        [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 0000000027319989 is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 000000002731998A is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 000000002731998B is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 000000002731998C is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 000000002731998D is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 000000002731998E is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 000000002731998F is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 0000000027319990 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 0000000027319991 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 0000000027319992 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 0000000027319993 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 0000000027319994 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000                           ]  [....]            
                at 0000000027319995 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 0000000027319996 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 0000000027319997 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 0000000027319998 is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 0000000027319999 is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 000000002731999A is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 000000002731999B is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 000000002731999C is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 000000002731999D is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 000000002731999E is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 000000002731999F is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199A0 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199A1 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 00000000273199A2 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 00000000273199A3 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 00000000273199A4 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000                           ]  [....]            
                at 00000000273199A5 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199A6 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199A7 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199A8 is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199A9 is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199AA is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199AB is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199AC is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199AD is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199AE is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199AF is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199B0 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199B1 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 00000000273199B2 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 00000000273199B3 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 00000000273199B4 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000                           ]  [....]            
                at 00000000273199B5 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199B6 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199B7 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199B8 is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199B9 is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199BA is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199BB is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199BC is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199BD is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199BE is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199BF is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199C0 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                at 00000000273199C1 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 00000000273199C2 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 00000000273199C3 is 9352 bytes (limiting dump to 1K)
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 63 times
                [00000000                           ]  [....]            
                at 00000000273199C4 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000                           ]  [....]            
                at 00000000273199C5 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199C6 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199C7 is 9352 bytes (limiting dump to 1K)
                [         00000000 00000000 00000000]      [............]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199C8 is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000                  ]  [........]        
                at 00000000273199C9 is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199CA is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199CB is 9352 bytes (limiting dump to 1K)
                [                  00000000 00000000]          [........]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199CC is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]
                 Repeat 62 times
                [00000000 00000000 00000000         ]  [............]    
                at 00000000273199CD is 9352 bytes (limiting dump to 1K)
                [                           00000000]              [....]
                [00000000 00000000 00000000 00000000]  [................]

My .NET web app presently uses Azure Windows server VM to receive and send SNMP email. My users send email to my web app, and my Windows server VM receives this email into its SNMP and then deposits it into a folder, which gets read by my backend .NET app.

I'm interested in switching to the new Azure web app model, but can't find anywhere how it would receive email.

My DNS provider uses my MX RECORD configuration to forward email from my users to the IP of my present VM server and then to its SNMP receive service, etc.

I am learning about the IdentityServer4 https://identityserver4.readthedocs.io/en/release/quickstarts/0_overview.html but seem to be having issues getting it working.

After creating the API section of the project and configured accordingly:

public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
            {
                Authority = "http://localhost:5000",
                RequireHttpsMetadata = false,

                ApiName = "api1"
            });

            app.UseMvc();
        }

I get the following error:

'IApplicationBuilder' does not contain a definition for 'UseIdentityServerAuthentication' and no extension method 'UseIdentityServerAuthentication' accepting a first argument of type 'IApplicationBuilder' could be found (are you missing a using directive or an assembly reference?)

Any advice what i am missing here?

how to get this data "{ 29.9, 71.5, 106.4}" from database???

DotNet.Highcharts.Highcharts chart = new DotNet.Highcharts.Highcharts("chart")
.InitChart(new Chart { Type = ChartTypes.Bar })
.SetTitle(new Title { Text = "Wind speed during two days" })
.SetLegend(new Legend { Enabled = false })
.SetXAxis(new XAxis{
Categories = new[] { "Jan", "Feb", "Mar" }
 }).SetSeries(new Series{
Data = new Data(new object[] { 29.9, 71.5, 106.4})
 });
ltrChart.Text = chart.ToHtmlString();

I have the following javascript/jquery syntax which asynchronously gets data from AWebpageThatProducesTextResult.aspx.

That webpage produces text/plain output that is either SUCCESS or FAIL and has the following settings

            Response.Clear(); //clear all prior output
            Response.ContentType = "text/plain;"; /*we just need a plain response so use text only*/
            Response.Write("SUCCESS"); /*or FAIL, depending on supplied*/ 
            Response.End();

However, I can't seem to get how I can compare success: function (data to the result of the jQuery $.ajax data result, (please refer to the commented lines for additional info

        $.ajax("Main/pAdministrator/AWebpageThatProducesTextResult.aspx?ver=111",
        {
            type: 'POST',
            dataType: 'text', //we just need to know if it succeded or failed, so use text
            data: {
                action: 'logIn',
                uname: $("#txtUsername").val(),
                pword: $("#txtPassword").val(),
                ipadr: hisIP
            },
            success: function (data, status, xhr) { //on success. 

                 //has  result.. bu does not redirect. damn. HOW DO I PROPERLY DO A   CONDITION?
                 if (data === 'SUCCESS')
                 {
                    window.location.replace("Home.aspx");
                 }
                else {
                     swal(data); //always goes here even if the login is 
                                   //correct! even if it says "SUCCESS"!
                 }
            },
            error: function (jqXhr, textStatus, errorMessage) { 
            }

        });

how can I properly do the data === 'SUCCESS' comparison? I think that is the root of the problem


well, it's a simple question actually. Why my Treeview doesn't display in IE 11. Even the icon for Treeview is not there. Its just like a crash image. It's not clickable also.

Check the image below:

not working treeview

or view on my public dropbox:

image

Please advise.
Thank you.

I am learning about Knowledge Based System (KBS). And I need somebody nice to help me find documentation about building KBS with ASP.NET.

Thanks everyone..!

Got a script to run crystal report over ASP.Net, export and send to email. Everything works with just tables but it does not seem to like SQL Expression Fields over functions.

If I use the current database without applying logon everything works but if I change datasource (same database different environment) at runtime then the issue below (but only with sql expression over function).

Crystal 2008 runtime

ERROR:System.Runtime.InteropServices.COMException (0x80042018): The table %1 does not exist in the document. at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.VerifyTableConnectivity(Object Table) at CrystalDecisions.CrystalReports.Engine.Table.TestConnectivity() at ScriptCodeClass.ApplyLogon(ReportDocument cr, ConnectionInfo ci) at ScriptCodeClass.Logon(ReportDocument cr, String server, String db, String id, String pass) at ScriptCodeClass.FunCreatePDFView(String lsHeader, String lsReportType, String msDatabaseUserId, String msDatabasePassword)

I want to embed the chat control to many websites and I want to get the Url of the website that I've embedded in order to my bot can get the Data matching with the Website URL. However, when I embed the iframe generated from WebChat, I always get the same ServiceUrl and that's https://webchat.botframework.com/, it isn't the Url of the website, so how can I embed the chat control to any website and my bot can get the website Url not the Url of the WebChat or DirectLine.

Here's what I've tried:Direct-Line chat control

Here's the result I've tested with my published bot: Result

I've noticed that, when I've tested my bot with the Bot Framework Emulator, it always return the exact Url of the sender (in case of local testingm, it will return http://localhost:XXXX/). So how can we do like this?