Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "otgontugsmiimaa"

I moved interfaces such as IPagedAndSortedInputDto to a new class library and referenced it to all projects. The code below may need someone to call Webapi functions. Thank you.

public static string BASE_URL = "http://localhost:6240";
        public static string GET_PARTS_URL = "api/services/app/part/GetParts";

        public static ListResultOutput<PartDto> GetParts()
        {
            HttpClient client = new HttpClient();
            client.BaseAddress = new Uri(BASE_URL);

            // Add an Accept header for JSON format.
            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

            string serviceUrl;

            // 2. Get all employees.
            serviceUrl = GET_PARTS_URL;
            AjaxResponse<ListResultOutput<PartDto>> parts = null;
            HttpResponseMessage response = client.PostAsJsonAsync(serviceUrl, new GetPartsInput()).Result;        // Blocking call!
            if (response.IsSuccessStatusCode)
            {
                // Parse the response body. Blocking!
                //parts = response.Content.ReadAsAsync<AjaxResponse<ListResultOutput<PartListDto>>>().Result;
                string s = response.Content.ReadAsStringAsync().Result;
                parts = JsonConvert.DeserializeObject<AjaxResponse<ListResultOutput<PartDto>>>(s);
            }
            else
            {
                throw new Exception(string.Format("{0} {1}", (int)response.StatusCode, response.ReasonPhrase));
            }
            return parts.Result;
        }

The DTOs depend on ASPNETZero interfaces such as IPagedAndSortedInputDto ... If i reference them, there would be no sense separating into class library project.

Yes, it might be a problem. So the solution is to move DTOs to a shared library. Thank you. Some more clarifications on class library please. Do i have to IOrganizationService interface to the class library and leave its implementation in Application project? So i can reuse the interface in client app. By the way, where can i configure URL to hosted app service?

Oh sorry i forgot these.


    <script src="~/api/AbpServiceProxies/GetAll?type=angular&v=@(Clock.Now.Ticks)"></script>
    <script src="~/api/AbpServiceProxies/GetAll?v=@(Clock.Now.Ticks)"></script>
    <script src="~/AbpScripts/GetScripts?v=@(Clock.Now.Ticks)" type="text/javascript"></script>

That's exactly what i want to hear. Thank you :)

Answer

Yes it's on port 80. There is a separate website working on mydomain.com and <a class="postlink" href="http://www.mydomain.com">www.mydomain.com</a> names.

ASP.NETZero demo is located in different folder and different IIS website bound to web1.mydomain.com.

PS: It seems IIS misconfiguration. When i added a binding tenant1.web1.mydomain.com to the IIS website, it worked. Thank you

Answer

Yes i've waited for the host to update dns. Now i can ping default.web1.mydomain.com and its pointing to my host.

Putting "127.0.0.1 default.web1.mydomain.com" in hosts file the same result. In IIS, web1.mydomain.com is bound to All assigned IP addresses. Any other clue?

Answer

Forgot to mention it. This setting was also defined. http://{TENANCY_NAME}.web1.mydomain.com/

Answer

If i understand you correctly, for example if you had given a name "SampleProject1", you should just publish SampleProject1.Web project in your solution to a local folder and copy it to your server. The other projects are referenced to SampleProject.Web and published together. The entry point is Global.asax file in SampleProject.Web :p

Showing 1 to 9 of 9 entries