Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 07 20:35
    nagytech closed #159
  • Feb 07 16:24
    onovotny commented #159
  • Feb 07 16:24
    onovotny commented #159
  • Feb 07 16:23

    dnfadmin on master

    Fix pointer to markdown file (compare)

  • Feb 07 16:21
    dnfadmin commented #159
  • Feb 06 13:21
    onovotny assigned #159
  • Feb 06 13:21
    onovotny reopened #159
  • Feb 06 13:21
    onovotny commented #159
  • Feb 06 04:56
    nagytech commented #159
  • Jan 25 18:14
    mysticmind commented #161
  • Jan 25 18:12
    mysticmind commented #161
  • Jan 25 18:11
    oskardudycz commented #161
  • Jan 25 17:37
    oskardudycz commented #161
  • Jan 25 17:36
    oskardudycz closed #161
  • Jan 25 17:35
    oskardudycz opened #161
  • Jan 25 04:38
    onovotny closed #160
  • Jan 25 04:38
    onovotny commented #160
  • Jan 25 03:54
    nagytech edited #160
  • Jan 25 03:54
    nagytech opened #160
  • Jan 25 03:52
    nagytech closed #159
Markus Schaber
@markusschaber
There should be no reason for such a library to depend on netcoreapp if netstandard is worth anything.
We had planned to update to netstandard 2.1 where we can benefit (e. g. serving etags from ZipFileEntry.CRC32 property), but it seems we'll end up referencing netcoreapp almost everywhere.
TeBeCo
@tebeco
No I mean you should always try netstandard2.0 first for classlib
Now if your lib need a NEW API that was introduced by netstandard2.1 then you target netstamdard2.1
TeBeCo
@tebeco
And finally
If you design a library that needs type from a FrameworkReference you will have to both :
  • be sure the sdk + global json is the same version as the types you want => need types for aspnetcore 3.1 ? Then 3.1.100
  • add <FrameworkRefwrence Include=“Msft.AspNetCore.App” />
  • change the csproj TargetFramework to the same one as the Frameowkr ref + version
    For aspnetcore3.DIGIT it’s targeting netcoreapp3.DIGIT
You theory is not so so wrong as there is supposed to be “one .net” soonish
So yeah probably no need of a standard anymore
TeBeCo
@tebeco
(Cannot edit “is not so wrong” => “is not wrong” my bad typo)
phizch
@phizch
I'm trying to create .net core 3.1 c++/cli library, but I can't even ´#include <Windows.h` without getting tons of build errors (´E0337 - linkage specification is incompatible with previous "bsearch_s"´, etc). I would like to submit an issue, but I can't figure out which repo I should post it on.
Mohammed Suhail
@mohammedsuhail85
Hello friends, I'm new to C# developing. I'm trying to build a windows form application working offline. So is there any database available working in the application only instead of using mssql or mysql?
I want to have an internal database... Any suggestions?
Stephen A. Imhoff
@Clockwork-Muse
@mohammedsuhail85 - I mean MSSqlServer still has an Express edition, which I believe is targeted for that sort of scenario. Otherwise, SQLite is pretty traditional, and presumably there are other options out there.
Mohammed Suhail
@mohammedsuhail85
@Clockwork-Muse Thank you for the response. Nice. But my doubt is that possible to have an internal database in a standalone system?
When it comes to sqlite is it possible to run inside an application?
Stephen A. Imhoff
@Clockwork-Muse
Yes for both. SQLite is a dll included alongside your app, and I believe the express edition functions similarly.
Mohammed Suhail
@mohammedsuhail85
@Clockwork-Muse Okay. Great. Thanks
james cooper
@jsc802_twitter
Hello
TeBeCo
@tebeco
hoy ;)
无限风灵
@WuLex
nice
jenu030594
@jenu030594
Any one know how to implement Payumoney payment gateway in .NET core?
Omar Cardona
@cardonaomar86_twitter
Hi there, does anyone knows why my click once app does not connect to a local API unless I install it from an administrator user first? I'm using the httpclient class. Once I installed it from the administrator user, I can uninstall it and log back to the normal user, now I'm gonna be able to install it from this user.
Stephen A. Imhoff
@Clockwork-Muse
.... @cardonaomar86_twitter - I don't know how to "solve" this right off, but I'm assuming that you need firewall entries to be added.
So installing via admin adds them, but non-admin doesn't get the rules added, and silently denies the addition at runtime; if you're on a corporate machine, this seems the most likely.
Omar Cardona
@cardonaomar86_twitter
@Clockwork-Muse Thanks for the response Stephen, I've already open the port at the firewall
Stephen A. Imhoff
@Clockwork-Muse
no idea then.
Omar Cardona
@cardonaomar86_twitter
@Clockwork-Muse what do you mean by rules, can I add this rules via code?
Stephen A. Imhoff
@Clockwork-Muse
Firewall "rules" are "allow outgoing to this address", "allow incoming on this port", etc. Yes, you can add them via API calls (I don't know if this can be done via C# itself, though). The Windows firewall will usually ask if you wish to allow a program to modify firewall rules or be able to connect in certain ways to outside resources, which is what made me suspect you were on a corporate machine (set to auto-deny)
Omar Cardona
@cardonaomar86_twitter
@Clockwork-Muse Ok thank you very much Stephen, let see how it goes!
jenu030594
@jenu030594
I want to find alternative of below code in .net core version 2.2. How can I achieve?
public void Post()
            {
                System.Web.HttpContext.Current.Response.Clear();
                System.Web.HttpContext.Current.Response.Write("<html><head>");
                System.Web.HttpContext.Current.Response.Write(string.Format("</head><body onload=\"document.{0}.submit()\">", FormName));
                System.Web.HttpContext.Current.Response.Write(string.Format("<form id=\"{0}\"  name=\"{0}\" method=\"{1}\" action=\"{2}\" >", FormName, Method, Url));
                for (int i = 0; i < Inputs.Keys.Count; i++)
                {
                    System.Web.HttpContext.Current.Response.Write(string.Format("<input name=\"{0}\" type=\"hidden\" value=\"{1}\">", Inputs.Keys[i], Inputs[Inputs.Keys[i]]));
                }
                System.Web.HttpContext.Current.Response.Write("</form>");              
                System.Web.HttpContext.Current.Response.Write("</body></html>");
                System.Web.HttpContext.Current.Response.End();
            }
TeBeCo
@tebeco
lots of context missing here
was that Owin / global asax / in a controller / ....
is that supposed to be sent directly to a browser ?
TeBeCo
@tebeco
i'm gonna make big assumptions but basically the replacement would be :
public xxx OnPost()
{
    // not sure how razor handles post redirect GET
    // because here you are subject to F5 spam
    // redirect OnGet()

    //note that there is no code handling html here
}

public xxx OnGet()
{
    // seed the razor page with only what it needs
    // FormName, Method, Url, Inputs.Keys

    // not sure why FormName, Method and Urls to be honest that's pretty weird
    // but again no context

    // note that again C# is not handling HTML either
}
the rendering would be handled by a razor page
or use a return View(data) and create controller + a View
there is no such thing as Current any more
the HttpContext is already available/accessible or injectable within controller/page

Response still exists, you might have to call Response.Body
not sure Clear() makes sense

Write should be replaced be WriteAsync() / WriteLineAsync() AND HAVE TO BE AWAITED :
await context.Response....WriteAsync(data)

.End() look like await .... FlushAsync()
jenu030594
@jenu030594
@tebeco Hello
I am implementing above code in web api.
TeBeCo
@tebeco
but again all that HttpContext can be removed as you should let razor handle all that lifecycle for you, it's way more flexible / less bug prone / ...
my first suggestion is that you take a look at what Razor Page is in the Docs
the docs are full of samples and tutorial to be honest it's amazingly great
if it's too simple, take a look at Mvc (controller + view)
jenu030594
@jenu030594
Thanks for your suggestion.
jenu030594
@jenu030594
How to make HTTP POST web request in .NET core?
jenu030594
@jenu030594
       [HttpPost]
        public void Demo(FormCollection form)
        {

            string firstName = form["txtfirstname"].ToString();
            string amount = form["txtamount"].ToString();
            string productInfo = form["txtprodinfo"].ToString();
            string email = form["txtemail"].ToString();
            string phone = form["txtphone"].ToString();
            string surl = form["txtsurl"].ToString();
            string furl = form["txtfurl"].ToString();


            RemotePost myremotepost = new RemotePost();
            string key = "gtKFFx";
            string salt = "eCwWELxi";

            //posting all the parameters required for integration.

            myremotepost.Url = "https://test.payu.in/_payment";

            //myremotepost.Url = "https://sandboxsecure.payu.in/_payment";

            myremotepost.Add("key", "gtKFFx");
            string txnid = Generatetxnid();
            myremotepost.Add("txnid", txnid);
            myremotepost.Add("amount", amount);
            myremotepost.Add("productinfo", productInfo);
            myremotepost.Add("firstname", firstName);
            myremotepost.Add("phone", phone);
            myremotepost.Add("email", email);

            myremotepost.Add("surl", "http://localhost:3271/Return/Return");//Change the success url here depending upon the port number of your local system.
            myremotepost.Add("furl", "http://localhost:3271/Return/Return");//Change the failure url here depending upon the port number of your local system.

            //myremotepost.Add("service_provider", "payu_paisa");
            myremotepost.Add("service_provider", "");

            string hashString = key + "|" + txnid + "|" + amount + "|" + productInfo + "|" + firstName + "|" + email + "|||||||||||" + salt;
            //string hashString = "gtKFFx|2590640|3053.00|OnlineBooking|vimallad|ladvimal@gmail.com|||||||||||eCwWELxi";
            string hash = Generatehash512(hashString);
            myremotepost.Add("hash", hash);

            myremotepost.Post();

        }

        public class RemotePost
        {
            private System.Collections.Specialized.NameValueCollection Inputs = new System.Collections.Specialized.NameValueCollection();


            public string Url = "";
            public string Method = "post";
            public string FormName = "form1";

            public void Add(string name, string value)
            {
                Inputs.Add(name, value);
            }

            public void Post()
            {                
                System.Web.HttpContext.Current.Response.Clear();

                System.Web.HttpContext.Current.Response.Write("<html><head>");

                System.Web.HttpContext.Current.Response.Write(string.Format("</head><body onload=\"document.{0}.submit()\">", FormName));
                System.Web.HttpContext.Current.Response.Write(string.Format("<form name=\"{0}\" method=\"{1}\" action=\"{2}\" >", FormName, Method, Url));
                for (int i = 0; i < Inputs.Keys.Count; i++)
                {
                    System.Web.HttpContext.Current.Response.Write(string.Format("<input name=\"{0}\" type=\"hidden\" value=\"{1}\">", Inputs.Keys[i], Inputs[Inputs.Keys[i]]));
                }

                System.Web.HttpContext.Current.Response.Write("</body></html>");
                System.Web.HttpContext.Current.Response.End();
            }
        }
Here is my source code.
From this code, In remote post class Post() method libraries is not working in .NET core.
What are alternative way to do this in .NET core with angular front end?
Stephen A. Imhoff
@Clockwork-Muse
"not working" is not an actionable problem description, you'd need to give specific desired outcomes, and what the actual real output is.
For general questions, though, StackOverflow is usually a better place to look for answers. However I can tell you right off that attempting to write HTML this way is going to be doomed to failure in short order.
Buddhika Chathuranga
@buddhikac96
Can someone suggest robust lib for YAML manipulating.
alrazy12
@alrazy12
hi
someone can help solve an error in a .net prject ?
TeBeCo
@tebeco
don't ask to ask
Chris Simeone
@simspace-dr

I am trying to create a Blazor WebAssembly app using the latest build of Visual Studio for Mac (v8.4.6 build 36).

I have .NET Core 3.1 SDK installed. I also installed the latest Blazor WebAssembly 3.2.0 Preview 1.

The Blazor WebAssembly App template does not show up in Visual Studio for Mac, even after restarting.

And if I create a Blazor WebAssembly app from the CLI as follows, it builds but does not run:

dotnet new blazorwasm
dotnet build
dotnet run

And if I try to run it in Visual Studio for Mac I get this error:
Cannot open assembly '/Users/my.username/projects/blazor/BlazerWasm/bin/Debug/netstandard2.1/BlazerWasm.exe': No such file or directory.

Is Visual Studio for Mac not able to build or run Blazor WebAssembly apps, or am I missing something?