Base solution for your next web application

Activities of "ervingayle"

I have a AspZero .net core v4.3 project with the following action in my controller. The goal is to output XML in the exact way that is needed for my external provider to process it accordingly. Initially adding the [DontWrapResult] helps me to get the output closer to what I need. However, I notice that when I publish the solution I am unable to view the method output (400 bad request) and I only get a response (200) when I access via localhost.

I have an Index() action that is working fine so this is not an issue with routes at least to the controller in my opinion.

// POST: Broadcast/Play
        [HttpPost]
        [DontWrapResult]
        public string Play(string recordingUrl)
        {

            var response = new VoiceResponse();
            response.Play(recordingUrl);

            //return (response.ToString());
            //return new XmlActionResult(response);
            //return new TwiMLResult(response.ToString());
            //return new Twilio.TwiML.VoiceResponse().Say(response.ToString());
            //TwilioController TwilioController = new TwilioController();
            //var res = TwilioController.TwiML(response,Encoding.UTF8);
            //return res.Data;

            //var data = LoadFromString(response.ToString(), Encoding.UTF8);

            //return data;

            var res = response.ToString();

            return res;

        }
        private static XDocument LoadFromString(string twiml, Encoding encoding)
        {
            var stream = new MemoryStream(encoding.GetBytes(twiml));

            var settings = new XmlReaderSettings();
            settings.DtdProcessing = DtdProcessing.Prohibit;

            var reader = XmlReader.Create(stream, settings);
            return XDocument.Load(reader);
        }

What am I doing wrong here?

Thank you for the link. I did review it before posting here and tried setting the property as I noted in my original post which I found in the Hangfire documentation. However, it is not working for me so I posted here. Has anyone else tried to do this?

I had a similar issue this week, potentially from my creation of the 4.3 .net core build. When I went to manage NuGet packages for the solution, Newtonsoft.Json was not installed. I added it for Web.Core, Web.Host and Web.Mvc and the error went away. You can try this and see if it resolves the issue for you.

I am looking to provide the ability for users to re-queue a group of jobs for processing again. In the use case of a marketing campaign, you may want to send a message multiple times or customize the message without modifying the recipient list. I have everything working in terms of creating the jobs and processing however I would like to show the tenant users the ability to re-queue the jobs. Each recipient is mapped to a single job (i.e 3000 recipients = 3000 jobs).

Also, in my web module I added:

//Configure Hangfire - ENABLE TO USE HANGFIRE INSTEAD OF DEFAULT JOB MANAGER
            Configuration.BackgroundJobs.UseHangfire(configuration =>
            {
                configuration.GlobalConfiguration.UseSqlServerStorage("Default",
                    new Hangfire.SqlServer.SqlServerStorageOptions
                    {
                        JobExpirationCheckInterval = TimeSpan.FromDays(365)
                    });
            });

My intention is to extend the default time that the hangfire jobs are stored however while the code above just not give any errors, its not taking effect. How can I accomplish this goal?

My experience is different on this topic. For those customers building a multi-tenant solution in some cases an organization may not want to leverage SSO/federation capabilities such as Google, etc for authenticating users even if they leverage those platforms already. There is certainly value and a need to provide a multi-tenant LDAP supported option. You are correct that customers will not blatantly expose their AD/LDAP to the public internet. This is why Azure and Amazon alike have implemented p2p VPN and other services to allow their existing policies around account management and server management to also apply to the cloud and for those cloud hosted services to use a common identity used by the organization.

I agree that the host account does not need to be an LDAP account. It should be a local user account identity.

There are other technologies like Bitium, Otka and Onelogin that exist precisely to address this problem in a way that does not require VPN. However, for us as AspNet Zero customers, I believe that this will be a BIG feature if it can be implemented.

I for one would be happy to test. I have many use cases and organizations to validate the use case.

I am migrating from Aspboilerplate where this worked into Asp.Net Zero and it has been fun. For the most part everything has gone well except for my views and plug-ins.

I am using a third party plug-in called Fusion Charts. <a class="postlink" href="http://www.fusioncharts.com/">http://www.fusioncharts.com/</a>

My environment is MVC + jQuery based. When I expand /Area/Mpa/Common there is a text file that says that I can place any shared plug-ins there and so I did. After this I got FusionCharts undefined errors. Since I am not using it on every page, I decided to remove the folder completely and just reference it where needed but now although I have removed the folder and its contents I get the JS error on every page and it has broken some of the functionality.

Reference details:

ReferenceError: FusionCharts is not defined[Learn More] js:799:54 /* Minification failed. Returning unminified contents. (1840,80-87): run-time error JS1019: Can't have 'break' outside of loop: break a (1840,320-327): run-time error JS1019: Can't have 'break' outside of loop: break a */

ReferenceError: FusionCharts is not defined[Learn More] js:10:54

TypeError: app.localStorage is undefined[Learn More] _ChatBar.js

Also I am trying to upgrade my jQuery version from 1.12.1 to 2.2. However, I noticed the version in /libs/jQuery is different than whats in /Scripts/* which is where the nuget package places the updated version that you select.

What am I doing wrong?

After the upgrade to the latest version of the API packages, I noticed that I am unable to build the project. I tried to revert to an earlier version but this is not working either.

Severity Code Description Project File Line Suppression State Error CS0308 The non-generic type 'PermissionChecker' cannot be used with type arguments Enotch.Core E:\Source Code\Project\Project.Core\Authorization\PermissionChecker.cs 8 Active

Severity Code Description Project File Line Suppression State Error CS0516 Constructor 'PermissionChecker.PermissionChecker(UserManager)' cannot call itself Enotch.Core E:\Source Code\Project\Project.Core\Authorization\PermissionChecker.cs 11 Active

Showing 31 to 37 of 37 entries